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

Thilo Borgmann thilo.borgmann at mail.de
Sat Jun 25 21:05:23 CEST 2016

Am 25.06.16 um 19:45 schrieb Carl Eugen Hoyos:
> 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.

Basically your patch LGTM if tested.

Carl Eugens hints are worth to verify - I'm lacking the time currently.
You might want to have a look at the overhaul patch (somewhere on the ML) if it
also uses the wrong code for copying you've just corrected with your patch or if
it already handle things differently (I just don't remember if that was one of
the things I'd changed).

Most likely I'll continue work on avfoundation after GSoC... I'm quite sorry for
all the bugs I cannot fix right now...


More information about the ffmpeg-devel mailing list