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 782960 - basesink: pipeline deadlocks when changing from PLAYING to PAUSED after processing a segment seek
basesink: pipeline deadlocks when changing from PLAYING to PAUSED after proce...
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal major
: git master
Assigned To: Josep Torra Valles
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-22 16:29 UTC by Josep Torra Valles
Modified: 2018-11-03 12:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that adds a unit test to reproduce the problem (5.09 KB, patch)
2017-05-22 16:37 UTC, Josep Torra Valles
none Details | Review
Proposed fix (3.80 KB, patch)
2017-05-22 16:39 UTC, Josep Torra Valles
none Details | Review

Description Josep Torra Valles 2017-05-22 16:29:11 UTC
When using segment seeks to play sections of a stream and we try to pause the pipeline after the segment-done event had reached the sink, the change state never finishes and it's stuck waiting for a preroll buffer.
Comment 1 Josep Torra Valles 2017-05-22 16:37:17 UTC
Created attachment 352366 [details] [review]
Patch that adds a unit test to reproduce the problem
Comment 2 Josep Torra Valles 2017-05-22 16:39:03 UTC
Created attachment 352367 [details] [review]
Proposed fix

This patch deals with the segment-done in basesink and make it participate on the needs_preroll check.
Comment 3 Mathieu Duponchelle 2017-11-02 22:27:11 UTC
The patch makes sense to me, I notice that after syncing the event in the EOS case, we also set sink->eos, which ends up getting used for two purposes:

* reporting eos after step done, I don't think this concerns us here
* some logic in get_position, which I think would be applicable here

This is not directly related to the issue, but as you're basically adding support for segment seeks in basesink here, might be worth it to look into that as well.

Otherwise lgtm, please tell me if you can have a quick look at the point above :)
Comment 4 Tim-Philipp Müller 2017-12-24 17:17:00 UTC
Do we need additional logic in gst_base_sink_get_sync_times() for the SEGMENT_DONE event as well then, similar to GST_EVENT_EOS?
Comment 5 Tim-Philipp Müller 2017-12-24 17:17:52 UTC
In any case, it seems fine to me, so let's get it in and see what happens?
Comment 6 Tim-Philipp Müller 2018-02-08 20:28:23 UTC
Josep?
Comment 7 Josep Torra Valles 2018-02-09 10:46:06 UTC
I don't know when I'll be able to dig on this again. So feel free to push it if you'll think it is correct or keep it latent in bugzilla if there are doubts.
Comment 8 GStreamer system administrator 2018-11-03 12:41:18 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/gstreamer/issues/237.