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 738064 - decodebin: The “drained” signal is emitted multiple times, first time too early (~1s)
decodebin: The “drained” signal is emitted multiple times, first time too ear...
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-07 08:20 UTC by Andrei Sarakeev
Modified: 2018-11-03 11:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (680 bytes, patch)
2014-10-07 08:20 UTC, Andrei Sarakeev
committed Details | Review

Description Andrei Sarakeev 2014-10-07 08:20:00 UTC
Created attachment 287928 [details] [review]
patch

GST_DEBUG=uridecodebin:5 gst-launch playbin uri=<VideoWithAudioFile>

log (media duration 10s):
0:00:09.219442212 uridecodebin gsturidecodebin.c:1780:proxy_drained_signal:<uridecodebin0> drained signaled
0:00:10.187942943 uridecodebin gsturidecodebin.c:1780:proxy_drained_signal:<uridecodebin0> drained signaled
0:00:10.187977506 uridecodebin gsturidecodebin.c:1780:proxy_drained_signal:<uridecodebin0> drained signaled
0:00:10.187987089 uridecodebin gsturidecodebin.c:1780:proxy_drained_signal:<uridecodebin0> drained signaled
Comment 1 Sebastian Dröge (slomo) 2014-10-07 11:52:21 UTC
commit a391dfe17f1a325f60e1d51a6d40c1a68eb196de
Author: Andrei Sarakeev <sarakusha@gmail.com>
Date:   Tue Oct 7 12:10:42 2014 +0400

    decodebin: Only emit the drain signal for the main decode chain, not any subchains
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738064
Comment 2 Sebastian Dröge (slomo) 2014-12-15 08:46:30 UTC
Reverted this one for now:

commit 65218700773e784587240c077c0c070dd6f503dd
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Mon Dec 15 09:45:43 2014 +0100

    Revert "decodebin: Only emit the drain signal for the main decode chain, not any subchains"
    
    This reverts commit a391dfe17f1a325f60e1d51a6d40c1a68eb196de.
    
    It breaks gapless playback: https://bugzilla.gnome.org/show_bug.cgi?id=740045
Comment 3 Nicolas Dufresne (ndufresne) 2017-06-27 16:05:00 UTC
I've just re-applied this patch to understand how it breaks, but it worked for me. Does it break with specific files ?
Comment 4 Nicolas Dufresne (ndufresne) 2017-06-27 16:10:48 UTC
Without or without the patch, it's equally broken with a ISOMP4 here. That only delta I observe is that drained signalled happening multiple time, and being a bit early.
Comment 5 Nicolas Dufresne (ndufresne) 2017-06-27 16:26:11 UTC
One thing I don't get about gapless in playbin2, is that it's totally missing any kind of segment offset, and the result totally reflects that, since the duration of the first stream is skipped in the second stream. For audio, there is a skew on the sink that makes it work apparently.

I am missing something ?
Comment 6 Nicolas Dufresne (ndufresne) 2017-06-27 17:06:41 UTC
Ok, just found the code that update the base on GstSegment in streamsynchronizer.
Comment 7 Nicolas Dufresne (ndufresne) 2017-06-27 17:18:36 UTC
Interesting, turning off qos fixes it.
Comment 8 GStreamer system administrator 2018-11-03 11:31:23 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/133.