From 986f3e15b267ee9de517e7854c19d8ab6c25959b Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Sun, 24 Sep 2017 14:35:01 -0400 Subject: [PATCH] flvdemux: Only set pixel-aspect-ratio if specified If it's not specified, we should let the decoder figure it out. Apparently the code was already in place, all was to make the code conditional. https://bugzilla.gnome.org/show_bug.cgi?id=787795 --- gst/flv/gstflvdemux.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c index 4fc2bad62e..2a0fa45aed 100644 --- a/gst/flv/gstflvdemux.c +++ b/gst/flv/gstflvdemux.c @@ -1364,8 +1364,10 @@ gst_flv_demux_video_negotiate (GstFlvDemux * demux, guint32 codec_tag) goto beach; } - gst_caps_set_simple (caps, "pixel-aspect-ratio", GST_TYPE_FRACTION, - demux->par_x, demux->par_y, NULL); + if (demux->got_par) { + gst_caps_set_simple (caps, "pixel-aspect-ratio", GST_TYPE_FRACTION, + demux->par_x, demux->par_y, NULL); + } if (G_LIKELY (demux->w)) { gst_caps_set_simple (caps, "width", G_TYPE_INT, demux->w, NULL);