CMSampleBufferRef in Swift 3 produce crash
<p>I have following Objective C interface in library:</p>

<pre><code>@interface VideoSource : NSObject

- (void)setFilter:(void(^)(void *))filter;

@end
</code></pre>

<p>It was built with SDK 9.3. First argument in callback is CMSampleBufferRef.</p>

<p>Now I want to use that code in Xcode 8 with Swift 3 but in Swift 3 CMSampleBufferRef is not a pointer but class CMSampleBuffer. I tried several options but they all produce crash. Here is one of my attempts:</p>

<pre><code>videoSource.setFilter { buffer in
    let p = buffer.load(as: UnsafeMutablePointer&lt;CMSampleBuffer&gt;.self)
    let sampleBuffer = p.pointee
}
</code></pre>

<p>How correct casting looks like?</p>