[gstreamer-bugs] [Bug 508321] [decodebin] EOS detected in typefind does not propagate

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sun Jan 13 12:07:18 PST 2008


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=508321

  GStreamer | gst-plugins-base | Ver: HEAD CVS

Tim-Philipp Müller changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |t.i.m at zen.co.uk




------- Comment #4 from Tim-Philipp Müller  2008-01-13 20:07 UTC -------
I agree that mp3parse should ideally post an error on seeing EOS and not having
output any data, but I also think that whoever is driving the pipeline (in this
case filesrc/basesrc, I guess), should also post an error when the
gst_pad_push_event(EOS) fails, ie. something like:

Index: gstbasesrc.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/libs/gst/base/gstbasesrc.c,v
retrieving revision 1.152
diff -u -p -r1.152 gstbasesrc.c
--- gstbasesrc.c        9 Jan 2008 12:25:17 -0000       1.152
+++ gstbasesrc.c        13 Jan 2008 20:04:35 -0000
@@ -2154,7 +2154,18 @@ pause:
               gst_message_new_segment_done (GST_OBJECT_CAST (src),
                   src->segment.format, src->segment.last_stop));
         } else {
-          gst_pad_push_event (pad, gst_event_new_eos ());
+          gboolean eos_ret;
+
+          eos_ret = gst_pad_push_event (pad, gst_event_new_eos ());
+          GST_ERROR ("eos_ret = %d", eos_ret);
+          if (!eos_ret) {
+            /* if downstream didn't handle the EOS event (like if it's not
+             * linked to a sink yet), post an error message so the app can
+             * shut down the pipeline correctly. */
+            GST_ELEMENT_ERROR (src, STREAM, FAILED,
+                (_("Internal data flow error.")),
+                ("streaming task paused, downstream did not accept EOS"));
+          }
           src->priv->last_sent_eos = TRUE;
         }
       } else {

Not sure why this worked in 0.10.13 right now ("something must have changed
somewhere"), but it seems the reason the FALSE from push_event isn't propagated
up to basesrc is that gst_pad_event_default_dispatch() doesn't accumulate the
return values - I think it should only return TRUE if at least one of the
_push_event() returned TRUE and otherwise FALSE.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=508321.




More information about the Gstreamer-bugs mailing list