From: Tim-Philipp Müller Date: Thu, 30 Jun 2016 16:30:34 +0000 (+0100) Subject: tagdemux: fix erroring out if we reach EOS without detecting type X-Git-Tag: 1.19.3~511^2~2791 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=130e78dbd8ac2a11f8f8f0c293d1193ad639c2bf;p=platform%2Fupstream%2Fgstreamer.git tagdemux: fix erroring out if we reach EOS without detecting type In 0.10 the source pad was a dynamic pad that was only added once the type had been detected, but in 1.x it's an always source pad, so checking whether it's still NULL won't work to detect if the type has been detected. Makes tagdemux error out when we get EOS but haven't managed to identify the format of the data after the tag. https://bugzilla.gnome.org//show_bug.cgi?id=768178 --- diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c index e7fbe81..d8296bb 100644 --- a/gst-libs/gst/tag/gsttagdemux.c +++ b/gst-libs/gst/tag/gsttagdemux.c @@ -764,8 +764,7 @@ gst_tag_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) switch (GST_EVENT_TYPE (event)) { case GST_EVENT_EOS: - /* FIXME, detect this differently */ - if (demux->priv->srcpad == NULL) { + if (!gst_pad_has_current_caps (demux->priv->srcpad)) { GST_WARNING_OBJECT (demux, "EOS before we found a type"); GST_ELEMENT_ERROR (demux, STREAM, TYPE_NOT_FOUND, (NULL), (NULL)); }