From e6d7e69844b6fa22d8c5b2943acd53a6e7edf3cd Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Mon, 26 Jul 2010 13:38:31 +0200 Subject: [PATCH] qtdemux: set the pixel-aspect-ratio field also for par=1/1 https://bugzilla.gnome.org/show_bug.cgi?id=625302 --- gst/qtdemux/qtdemux.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index 63d9acaba5..4ab565c93d 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -3981,11 +3981,11 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux, /* calculate the pixel aspect ratio using the display and pixel w/h */ n = stream->display_width * stream->height; d = stream->display_height * stream->width; - if (n != d) { - GST_DEBUG_OBJECT (qtdemux, "setting PAR to %d/%d", n, d); - gst_caps_set_simple (stream->caps, "pixel-aspect-ratio", - GST_TYPE_FRACTION, n, d, NULL); - } + if (n == d) + n = d = 1; + GST_DEBUG_OBJECT (qtdemux, "setting PAR to %d/%d", n, d); + gst_caps_set_simple (stream->caps, "pixel-aspect-ratio", + GST_TYPE_FRACTION, n, d, NULL); } /* qt file might have pasp atom */