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 779310 - tsdemux: racy handling of concurrent seek events in push mode
tsdemux: racy handling of concurrent seek events in push mode
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-27 13:56 UTC by Arnaud Vrac
Modified: 2018-11-03 14:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Arnaud Vrac 2017-02-27 13:56:54 UTC
When configured in push mode, tsdemux can generate a segment while flushing or with wrong values, when two consecutive seek events are handled in parallel. This can stall the pipeline for very long times.

Here's a stripped/tweaked log from tsdemux that exhibits this issue:

stm0: seek to 95032ms from start

<tsdemux0> seek event, rate: 1.000000 start: 0:01:35.032000000 stop: 99:99:99.999999999
<tsdemux0> Got event flush-start
<tsdemux0> Got event flush-stop
<tsdemux0> soft flush of all streams
<tsdemux0> Got event segment
<tsdemux0> soft flush of all streams
<tsdemux0:audio_0_0045> first PTS 0:01:32.669048481
<tsdemux0:video_0_0044> first PTS 0:01:33.429048481
<tsdemux0> Pushing segment event: 0x73d06ec0, time 99:99:99.999999999, seq-num 1133, GstEventSegment, segment=(GstSegment)"GstSegment, flags=(GstSegmentFlags)GST_SEGMENT_FLAG_NONE, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, base=(guint64)0, offset=(guint64)0, start=(guint64)92669048481, stop=(guint64)18446744073709551615, time=(guint64)92669048481, position=(guint64)92669048481, duration=(guint64)18446744073709551615;";

stm0: seek to 125032ms from start

<tsdemux0> seek event, rate: 1.000000 start: 0:02:05.032000000 stop: 99:99:99.999999999
<tsdemux0> Got event flush-start
<tsdemux0> Pushing segment event: 0x73d06e80, time 99:99:99.999999999, seq-num 1133, GstEventSegment, segment=(GstSegment)"GstSegment, flags=(GstSegmentFlags)GST_SEGMENT_FLAG_NONE, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, base=(guint64)0, offset=(guint64)0, start=(guint64)0, stop=(guint64)18446744073709551615, time=(guint64)0, position=(guint64)0, duration=(guint64)18446744073709551615;";
<tsdemux0:audio_0_0045> first PTS 0:01:34.525048481
<tsdemux0> Got event flush-stop
<tsdemux0> soft flush of all streams
<tsdemux0> Got event segment
<tsdemux0> soft flush of all streams
<tsdemux0:video_0_0044> first PTS 0:02:03.429048481

GStreamer-WARNING **: ../../gitsrc/gst/gstpad.c:4429:gst_pad_push_data:<tsdemux0:video_0_0044> Got data flow before segment event
GStreamer-WARNING **: ../../gitsrc/gst/gstpad.c:4176:gst_pad_chain_data_unchecked:<multiqueue0:sink_0> Got data flow before segment event
...

In this example the second segment is sent too early, and its start value is invalid. The start value should be the lowest PTS in all streams received after the seek event, but here no data was received yet (flush_stop hasn't even been received yet).
Comment 1 rland 2018-04-03 02:16:12 UTC
I encountered the same problem.
----
gst-play-1.0 http://test.ts <tsdemux_push>
gst-play-1.0 /home/dev/test.ts <tsdemux_pull>
In addition,
In the push mode, duration is always wrong, while pull mode is OK.
Comment 2 GStreamer system administrator 2018-11-03 14:05:05 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-bad/issues/525.