[FFmpeg-devel] [PATCH] lavd/avfoundation: Fix skewed video output

Carl Eugen Hoyos cehoyos at ag.or.at
Sat Jun 25 19:45:47 CEST 2016

Rick Kern <kernrj <at> gmail.com> writes:

> Fixes #5654.

Can you reproduce and test?
I was also looking at CVPixelBufferGetBytesPerRow() but I was 
wondering if FFmpeg maybe uses an incorrect width; does 
CVPixelBufferGetWidth() return the expected value?

> +    int src_linesize[4];

> +    memset(src_linesize, 0, sizeof(src_linesize));

I believe this should be:
int src_linesize[4] = { 0 };

> +        size_t plane_count = CVPixelBufferGetPlaneCount(image_buffer);

Maybe check if plane_count is identical with what 
av_image_copy below will use because of the pixel_format.

Carl Eugen

More information about the ffmpeg-devel mailing list