After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 727821 - souphttpsrc: Regression in push mode
souphttpsrc: Regression in push mode
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal blocker
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2014-04-08 12:01 UTC by Andoni Morales
Modified: 2014-04-09 08:57 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description Andoni Morales 2014-04-08 12:01:21 UTC
oggdemux doesn't work in push mode anymore because it's forwarding the EOS from souphttpsrc seeking to the end of the file to determine the duration.

The regressions seems to have been introduced in:

commit 0173afa38cc6f8a2cb810f99a24ddb1d5d5f4868
Author: Vincent Penquerc'h <>
Date:   Sat Aug 13 14:18:56 2011 +0100

    oggdemux: implement push mode seeking

+#if 0
+      /* This would be what is needed (recover from EOS by going on to
+         the next step (issue the delayed seek)), but it does not work
+         if there is a queue2 upstream - see more details comment in
+         gst_ogg_pad_submit_page.
+         If I could find a way to bypass queue2 behavior, this should
+         be enabled. */
+      GST_PUSH_LOCK (ogg);
+      if (ogg->push_state == PUSH_DURATION) {
+        GST_DEBUG_OBJECT (ogg, "Got EOS while determining length");
+        res = gst_ogg_demux_seek_back_after_push_duration_check_unlock (ogg);
+        if (res != GST_FLOW_OK) {
+          GST_DEBUG_OBJECT (ogg, "Error seeking back after duration check: %d",
+              res);
+        }
+        break;
+      }
+      GST_PUSH_UNLOCK (ogg);

It can be easilly reproduced with:
gst-launch-1.0 playbin uri=
Comment 1 Vincent Penquerc'h 2014-04-08 13:07:17 UTC
Works for me with latest git (core, -base, -good).

This hunk adds defined out code, does not change behavior.

The duration check seeks near the end, but not right to the end, in order to avoid the EOS, which can shut down upstream tasks. I guess something upstream overreads anyway.

If that's the case, increasing EOS_AVOIDANCE_THRESHOLD might fix it, though probably not very well. Enabling the code you quoted might too, but it will not cause any upstream task to restart if they stopped from the EOS.
Comment 2 Andoni Morales 2014-04-08 14:08:55 UTC
It looks more like souphttsrc's fault. Reverting this commit make it work again:

commit ac839610334a1ad34177f419bd22a2481e9b5d89
Author: Sebastian Dröge <>
Date:   Fri Mar 7 16:17:29 2014 +0100

    souphttpsrc: Make sure to not return EOS immediately if we finished a range request
    Only return EOS the next time create() is called, if at all. basesrc
    should already take care of not calling it again.
    Also always return immediately if the previous flow return was
    not OK. This indicates an error somewhere.
Comment 3 Sebastian Dröge (slomo) 2014-04-09 07:07:27 UTC
Also happens with mp4 files:
Comment 4 Sebastian Dröge (slomo) 2014-04-09 08:49:46 UTC
Most simple testcase:

> gst-launch-1.0 souphttpsrc location= ! queue2 use-buffering=true ! qtdemux ! fakesink sync=true
Comment 5 Sebastian Dröge (slomo) 2014-04-09 08:57:35 UTC
commit d918212e127a1cfe9b19ecc514f4835c5ee00ea9
Author: Sebastian Dröge <>
Date:   Wed Apr 9 10:56:29 2014 +0200

    souphttpsrc: Use GST_FLOW_FLUSHING when flushing, not GST_FLOW_EOS
    ... and reset it properly after flushing is done. Fixes playback
    in many cases when buffering is used.