mpeg2dec: Fix handling of stride
authorSimon Farnsworth <simon.farnsworth@onelan.co.uk>
Wed, 21 Jan 2015 18:29:22 +0000 (18:29 +0000)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Sun, 15 Feb 2015 21:11:41 +0000 (15:11 -0600)
commitf3e8dcb9de4d546e7d80ccc1754ed13dd4e7ac81
tree337dd90b01fad1f0dfed394b28768291edf53a22
parent7dc03df3ded9ce1edbb81d72fea0ceeba3252820
mpeg2dec: Fix handling of stride

A pipeline like:

gst-launch-1.0 filesrc location=file.ts ! tsdemux ! mpegvideoparse ! mpeg2dec  ! vaapisink

would look bad when file.ts contains 704x576 video, because vaapisink would
give you buffers of stride 768, but libmpeg2 was not told about this and
used a stride of 704.

Tell libmpeg2 about the stride from  downstream; in the process, teach it to
reject buffer pools that don't meet libmpeg2's chroma stride requirements

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
ext/mpeg2dec/gstmpeg2dec.c