gst/asfdemux/gstasfdemux.c: Only copy sane aspect ratio values on the caps. Fixes #559682.

Original commit message from CVS:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_add_video_stream):
Only copy sane aspect ratio values on the caps. Fixes #559682.
This commit is contained in:
Wim Taymans 2008-11-11 17:14:46 +00:00
parent 48024902b0
commit 0ba1ec7104
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2008-11-11 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_add_video_stream):
Only copy sane aspect ratio values on the caps. Fixes #559682.
2008-11-05 Wim Taymans <wim.taymans@collabora.co.uk>
* ext/amrnb/amrnbdec.c: (gst_amrnb_variant_get_type),

View file

@ -1782,8 +1782,11 @@ gst_asf_demux_add_video_stream (GstASFDemux * demux,
s = gst_asf_demux_get_metadata_for_stream (demux, id);
if (gst_structure_get_int (s, "AspectRatioX", &ax) &&
gst_structure_get_int (s, "AspectRatioY", &ay)) {
gst_caps_set_simple (caps, "pixel-aspect-ratio", GST_TYPE_FRACTION,
ax, ay, NULL);
/* only copy sane values */
if (ax > 0 && ay > 0) {
gst_caps_set_simple (caps, "pixel-aspect-ratio", GST_TYPE_FRACTION,
ax, ay, NULL);
}
}
/* remove the framerate we will guess and add it later */
s = gst_caps_get_structure (caps, 0);