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
This commit is contained in:
Nicolas Dufresne 2017-09-24 14:35:01 -04:00
parent 307018da89
commit 986f3e15b2

View file

@ -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);