diff --git a/ChangeLog b/ChangeLog index 2f77b55830..757d3c6440 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-11-11 Wim Taymans + + * 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 * ext/amrnb/amrnbdec.c: (gst_amrnb_variant_get_type), diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c index 04d5afda40..392640d496 100644 --- a/gst/asfdemux/gstasfdemux.c +++ b/gst/asfdemux/gstasfdemux.c @@ -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);