From: Sebastian Dröge Date: Wed, 19 Jun 2019 11:13:02 +0000 (+0300) Subject: mpegvideoparse: Pass through interlace-mode field from upstream if available X-Git-Tag: 1.19.3~507^2~3214 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=324e55a3cdd7c6cef24356fd626deee5fba343df;p=platform%2Fupstream%2Fgstreamer.git mpegvideoparse: Pass through interlace-mode field from upstream if available We generally always prefer the information from upstream for other metadata (pixel-aspect-ration, etc.) and should also do so here. Other parsers (h264parse) already do the same. --- diff --git a/gst/videoparsers/gstmpegvideoparse.c b/gst/videoparsers/gstmpegvideoparse.c index eef79bc..59789fc 100644 --- a/gst/videoparsers/gstmpegvideoparse.c +++ b/gst/videoparsers/gstmpegvideoparse.c @@ -978,9 +978,10 @@ gst_mpegv_parse_update_src_caps (GstMpegvParse * mpvparse) else GST_DEBUG_OBJECT (mpvparse, "Invalid level - %u", level_c); - gst_caps_set_simple (caps, "interlace-mode", - G_TYPE_STRING, - (mpvparse->sequenceext.progressive ? "progressive" : "mixed"), NULL); + if (!s || !gst_structure_has_field (s, "interlace-mode")) + gst_caps_set_simple (caps, "interlace-mode", + G_TYPE_STRING, + (mpvparse->sequenceext.progressive ? "progressive" : "mixed"), NULL); } gst_pad_set_caps (GST_BASE_PARSE_SRC_PAD (mpvparse), caps);