GNOME Bugzilla – Bug 331301
[mpeg2dec] strides issues when cropping
Last modified: 2006-02-17 13:29:58 UTC
mpeg2dec is a bad citizen in Stridesville. Take the following video: http://lycos.dropcode.net/xgl/xgl-gentoo-lycos.mpeg which has dimensions of 764x556 pixels, so it gets cropped + copied before sending it out, albeit the new I420 output buffer is allocated with wrong size, and strides (as implicit by X) are not taken into account when copying. This is with up-to-date CVS, ie. including the fix from bug #330844 (which is required).
Created attachment 59416 [details] [review] possible fix
Oh, even with the fix ffmpegcolorspace/basetransform still complains because ffmpegcolorspace assumes a different (too small) unit size due to the same issue.
Fixed in CVS: * ext/mpeg2dec/gstmpeg2dec.c: (crop_copy_i420_buffer), (crop_copy_i422_buffer), (crop_buffer): When we need to crop the output buffer, make sure we create a buffer of the right size and respect the implicit striding used for I420 elsewhere in GStreamer (#331301). We should handle the ffmpegcolorspace issue separately.