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 778471 - Pipelines don't pre-roll on empty segments after a segment seek.
Pipelines don't pre-roll on empty segments after a segment seek.
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-10 23:01 UTC by Olivier Crête
Modified: 2018-11-03 12:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
basesink: Add test for committing state on segment done (2.40 KB, patch)
2017-02-10 23:02 UTC, Olivier Crête
none Details | Review
basesink: Treat segment-done like EOS to complete state changes (4.36 KB, patch)
2017-02-10 23:02 UTC, Olivier Crête
none Details | Review
basesink: Treat segment-done like EOS to complete state changes (3.98 KB, patch)
2017-02-28 21:41 UTC, Olivier Crête
none Details | Review

Description Olivier Crête 2017-02-10 23:01:53 UTC
GstBaseSink doesn't complete the preroll on an empty segment after a segment seek. So the test case is to do a segment seek, which results in a segment event, immediately followed by a SEGMENT_DONE.. If you have more than one sink in the pipeline, then the other sinks wait in wait_preroll forever. The proposed solution is to just treat the SEGMENT_DONE event like EOS and complete the state change when it is received.

I'm not sure if I understand segment seeks correctly, or if they should just be ignored for prerolling purposes and that an actual buffer or EOS is needed?
Comment 1 Olivier Crête 2017-02-10 23:02:15 UTC
Created attachment 345493 [details] [review]
basesink: Add test for committing state on segment done

This test currently deadlocks.
Comment 2 Olivier Crête 2017-02-10 23:02:19 UTC
Created attachment 345494 [details] [review]
basesink: Treat segment-done like EOS to complete state changes

If a segment seek results into an empty segment, then complete the state
change just as if it was an EOS after a non-segment seek.
Comment 3 Olivier Crête 2017-02-28 21:41:47 UTC
Created attachment 346936 [details] [review]
basesink: Treat segment-done like EOS to complete state changes

Only diff since last version is to remove the check for the SEGMENT flag in the GstSegment as BaseSrc doesn't push a segment event sometimes (if a seek happens after num-buffers has been reached). So just always treat SEGMENT_DONE like a EOS.

I wonder if the fix would be to make basesrc push the segment event when the subclass returns EOS from the getrange function instead.
Comment 4 Olivier Crête 2017-04-06 23:28:06 UTC
Any reason I shouldn't push this?
Comment 5 GStreamer system administrator 2018-11-03 12:39:27 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/220.