GNOME Bugzilla – Bug 380944
[dvdec] Doesn't set pixel-aspect-ratio
Last modified: 2007-03-09 17:33:41 UTC
dvdec assumes that the pixel-aspect-ratio property on the caps will be set by upstream elements, which is true for DV in DV system streams. But if that stream is contained in an AVI or a Quicktime file, the demuxer will not set the pixel-aspect-ratio. This causes problems since the outgoing caps will not have PAR, which means that the display aspect ratio will be wrong (it can be seen quite clearly with widescreen DV files). The libdv API offers enough to actually figure out what PAR should be set (the same logic is done in dvdemux in fact).
Created attachment 83733 [details] [review] Patch to improve negotiation Please test this patch.
Committed after fixing a trivial crash and logic error. Tested with all DV files I have handy, some in AVI and some straight DV. * ext/dv/gstdvdec.c: (gst_dvdec_init), (gst_dvdec_sink_setcaps), (gst_dvdec_src_negotiate), (gst_dvdec_chain), (gst_dvdec_change_state): * ext/dv/gstdvdec.h: Infer pixel-aspect-ratio from the video frame format if it isn't provided by the container, as happens when playing DV from AVI or Quicktime containers. Patch by: Wim Taymans <wim@fluendo.com> Fixes #380944