CMSampleBufferGetImageBuffer returning null
<p>I am trying to retrieve a CVPixelBufferRef from CMSampleBufferRef in-order to alter the CVPixelBufferRef to overlay a watermark on the fly.</p>

<p>I am using <code>CMSampleBufferGetImageBuffer(sampleBuffer)</code> in-order to achieve that. I am printing the result of the returned  CVPixelBufferRef, but its always null.</p>

<pre><code>- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection {

    CVPixelBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);

    NSLog(@"PixelBuffer %@",pixelBuffer);
...

}
</code></pre>

<p>I there anything I am missing?</p>