[FFmpeg-devel] [PATCH 1/2] avcodec: Don't assume separate u and v planes in ff_alloc_picture

Michael Niedermayer michael at niedermayer.cc
Wed Nov 15 02:31:40 EET 2017


On Tue, Nov 14, 2017 at 07:24:13AM -0800, Philip Langdale wrote:
> I'm confused at how none of the previous hwaccels hit this, but
> alloc_frame_buffer in ff_alloc_picture asserts that the linesize
> of planes 1 and 2 are the same. If the pixfmt has a single uv
> plane, like NV12, this won't be true.
> 
> So, let's only do this check if there are more than 2 planes.
> 
> I didn't bother investigating why, but vdpau avoids this by having
> all linesizes set to zero. Cute.
> 
> Signed-off-by: Philip Langdale <philipl at overt.org>
> ---
>  libavcodec/mpegpicture.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

LGTM

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171115/65225d78/attachment.sig>


More information about the ffmpeg-devel mailing list