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 736012 - dashdemux hlsdemux mssdemux: playback failing due to pad EOS state
dashdemux hlsdemux mssdemux: playback failing due to pad EOS state
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal blocker
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-04 08:22 UTC by Chris Bass
Modified: 2014-09-18 15:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dashdemux: fix clearing of eos state in pads (2.15 KB, patch)
2014-09-17 20:09 UTC, Thiago Sousa Santos
committed Details | Review

Description Chris Bass 2014-09-04 08:22:40 UTC
Commit 060b16ac75ac227d4cfe1db89ccdc4f4b31545ff seems to have broken DASH playback.

If I run the following:

gst-launch-1.0 playbin uri=http://rdmedia.bbc.co.uk/dash/ondemand/bbb/avc3/1/client_manifest-separate_init.mpd

The client hangs after fetching the video and audio intialisation segments. From the debug output it looks like dashdemux gets stuck in the state of waiting for the initialisation segments to arrive, event though wireshark shows that they are successfully delivered; the last debug before it hangs is this:

[...]
0:00:00.090497256  6531 0xb3e025b0 INFO               dashdemux gstdashdemux.c:1789:gst_dash_demux_get_next_header:<dashdemux0> Fetching header A2-aud.mp4/IS 0--1
0:00:00.090519885  6531 0xb3e025b0 DEBUG              dashdemux gstdashdemux.c:2161:gst_dash_demux_stream_download_uri:<dashdemux0:ghostpad1> Downloading uri: http://rdmedia.bbc.co.uk/dash/ondemand/bbb/avc3/1/A2-aud.mp4/IS, range:0 - -1
0:00:00.091131974  6531 0xb3e025b0 DEBUG              dashdemux gstdashdemux.c:2193:gst_dash_demux_stream_download_uri:<dashdemux0:ghostpad1> Waiting for fragment download to finish: http://rdmedia.bbc.co.uk/dash/ondemand/bbb/avc3/1/A2-aud.mp4/IS

If I roll back to the previous commit, 63a943aa8215be781b62b77dfdb2d2ad2c534899, playback works as normal.
Comment 1 Sebastian Dröge (slomo) 2014-09-04 08:30:52 UTC
This commit was added as fix for bug #735357.
Comment 2 Nicolas Dufresne (ndufresne) 2014-09-04 15:10:24 UTC
Same with: gst-play-1.0 http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8
Comment 3 Sebastian Dröge (slomo) 2014-09-04 15:25:18 UTC
commit bda4eae1cc0258a918c4ba039f84b29ead0eb049
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Thu Sep 4 18:21:38 2014 +0300

    mssdemux: Don't send flush events to deactivated pads
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736012

commit 51a9e13bf23940b9463e27a3d279ee21eb5a9bc1
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Thu Sep 4 18:21:25 2014 +0300

    dashdemux: Don't send flush events to deactivated pads
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736012

commit f6c6d9c280f94e66fe29531ac5a38d7add051407
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Thu Sep 4 18:20:58 2014 +0300

    hlsdemux: Don't send flush events to deactivated pads
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736012
Comment 4 Chris Bass 2014-09-08 11:52:08 UTC
Still doesn't work for me with DASH.

On different runs it will initially fetch a varying number of video/audio segments and will open an X window, but video playback doesn't start. Very occasionally, playback does start, but it stops a short way into the stream.
Comment 5 Tim-Philipp Müller 2014-09-08 11:57:09 UTC
I noticed a regression with DASH the other day, which was not related to the flushing/pad stuff, since it happened before Wim pushed that change.
Comment 6 Thiago Sousa Santos 2014-09-09 19:37:19 UTC
This could be related to https://bugzilla.gnome.org/show_bug.cgi?id=736295
Comment 7 Sebastian Dröge (slomo) 2014-09-12 14:27:35 UTC
(In reply to comment #4)
> Still doesn't work for me with DASH.
> 
> On different runs it will initially fetch a varying number of video/audio
> segments and will open an X window, but video playback doesn't start. Very
> occasionally, playback does start, but it stops a short way into the stream.

Can you get a debug log and also a backtrace of all threads when it stops?
Comment 8 Chris Bass 2014-09-16 09:14:50 UTC
(In reply to comment #7)
[...]
> Can you get a debug log and also a backtrace of all threads when it stops?

Sure:

http://dev-iplatforms.kw.bbc.co.uk/~chrisb/dash.log
http://dev-iplatforms.kw.bbc.co.uk/~chrisb/dash.backtrace

These files were captured on a run in which the first segment of audio & video were presented, but the client seemed to stall when it got to downloading segment 3 of the A/V representations.
Comment 9 Thiago Sousa Santos 2014-09-17 03:54:20 UTC
0:00:01.662786751  6300 0xb49029b0 WARN                GST_PADS gstpad.c:3742:gst_pad_peer_query:<souphttpsrc0:src> could not send sticky events


Seems to be caused by the flush-stop change patches. I'm working on a fix.
Comment 10 Thiago Sousa Santos 2014-09-17 20:09:51 UTC
Created attachment 286420 [details] [review]
dashdemux: fix clearing of eos state in pads

The internal pad still keeps its EOS flag and event as it can be assigned
after the flush-start/stop pair is sent. The EOS is assigned from the streaming
thread so this is racy.

To be sure to clear it, it has to be done after setting the source to READY to
be sure that its streaming thread isn't running.
Comment 11 Sebastian Dröge (slomo) 2014-09-18 09:56:21 UTC
Comment on attachment 286420 [details] [review]
dashdemux: fix clearing of eos state in pads

Why not just deactivate/reactivate the internal pad?

But seems ok
Comment 12 Thiago Sousa Santos 2014-09-18 14:47:21 UTC
(In reply to comment #11)
> (From update of attachment 286420 [details] [review])
> Why not just deactivate/reactivate the internal pad?
> 
> But seems ok

I already told on IRC but just to register it here: the internal pad is a proxy pad and deactivating/reactivating it will also do it on the ghostpad, dropping the stream-start and segment events and we don't want to do that.
Comment 13 Thiago Sousa Santos 2014-09-18 15:22:57 UTC
commit 01ccac24fa1f69687c42e9ae7b7148174040007b
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Wed Sep 17 17:27:53 2014 -0300

    mssdemux: fix clearing of eos state in pads
    
    The internal pad still keeps its EOS flag and event as it can be assigned
    after the flush-start/stop pair is sent. The EOS is assigned from the streaming
    thread so this is racy.
    
    To be sure to clear it, it has to be done after setting the source to READY to
    be sure that its streaming thread isn't running.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736012

commit 07b59c93c2f724cbd23d45539847147ec5c21760
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Wed Sep 17 17:27:25 2014 -0300

    hlsdemux: fix clearing of eos state in pads
    
    The internal pad still keeps its EOS flag and event as it can be assigned
    after the flush-start/stop pair is sent. The EOS is assigned from the streaming
    thread so this is racy.
    
    To be sure to clear it, it has to be done after setting the source to READY to
    be sure that its streaming thread isn't running.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736012

commit 24c99712a87f35688947ede03d5d73cecfe813b5
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Wed Sep 17 14:51:53 2014 -0300

    dashdemux: fix clearing of eos state in pads
    
    The internal pad still keeps its EOS flag and event as it can be assigned
    after the flush-start/stop pair is sent. The EOS is assigned from the streaming
    thread so this is racy.
    
    To be sure to clear it, it has to be done after setting the source to READY to
    be sure that its streaming thread isn't running.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736012