GNOME Bugzilla – Bug 308644
[matroska] Incorrect pixel-aspect-ratio in matroska demuxer
Last modified: 2005-06-22 15:09:04 UTC
videocontext->display_width and videocontext->display_height are not initialized when they are not found in caps and hence the pixel-aspect-ratio is computed as more or less random fraction (even negative)
Created attachment 48154 [details] [review] Patch to initialize display_width and display_height correctly The problem is that videocontext->display_width and ideocontext->display_height are not initialized, however, later there is a test if (videocontext->display_width > 0 && videocontext->display_height > 0) and if this is true, pixel-aspect-radio is computed and set to caps. This pixel-aspect-ratio can be even negative which confuses xvimagesink.
Thanks, applied to the 0.8 branch (with minor modifications, I zeroed the pixel_width, pixel_height and fourcc fields as well): 2005-06-22 Michael Benes <michael dot benes at xeris dot cz> Reviewed by: Tim-Philipp Muller <tim at centricular dot net> * gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream): Initialize the video context properly, so we don't get random aspect ratios when no aspect ratio is set (#308644). Cheers -Tim