[Bug 763262] New: Regression: [mpegtsdemux] Mpeg TS accurate seeks are no more accurate.

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Mar 7 19:26:07 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=763262

            Bug ID: 763262
           Summary: Regression: [mpegtsdemux] Mpeg TS accurate seeks are
                    no more accurate.
    Classification: Platform
           Product: GStreamer
           Version: 1.5.1
                OS: All
            Status: NEW
          Severity: major
          Priority: Normal
         Component: gst-plugins-bad
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: hanczarmail at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Created attachment 323320
  --> https://bugzilla.gnome.org/attachment.cgi?id=323320&action=edit
test code doing seeks.

Hi,
I encountered problem that for any gstreamer version greater than 1.4.5
accurate seeks stopped to work with mpeg files, pipeline position after seek on
them with GST_SEEK_FLAG_ACCURATE is always few seconds away from target
position.

On 1.4.5 and previous versions such seeks work perfectly.

Problem exists from 1.5.1 version and still present on version 1.7.90 and
master.

I'm attaching simple code snippet  which shows problem.

Started with any mpg or mts file as parameter on version 1.5.1+:
./a.out ./sss.mpg
** Message: seek(0) to position(5 s), playbin position after
seek:0:00:02.688088888
** Message: seek(1) to position(10 s), playbin position after
seek:0:00:07.701766667
** Message: seek(2) to position(20 s), playbin position after
seek:0:00:17.684744444
** Message: seek(3) to position(15 s), playbin position after
seek:0:00:12.757077777

on version 1.4.5:
** Message: seek(0) to position(5 s), playbin position after
seek:0:00:05.000000000
** Message: seek(1) to position(10 s), playbin position after
seek:0:00:10.000000000
** Message: seek(2) to position(20 s), playbin position after
seek:0:00:20.000000000
** Message: seek(3) to position(15 s), playbin position after
seek:0:00:15.000000000

After checking commits between version 1.4.5 and 1.5.1, commit which introduces
this regression is :

>git show ade79a9ad24a72d1b02f2e35e7dbeaf3bd59bb6c
>commit ade79a9ad24a72d1b02f2e35e7dbeaf3bd59bb6c
>Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
>Date:   Tue Mar 24 12:56:53 2015 +0000
>
>    tsdemux: send new segment when a stream is added
>    
>    This will happen when the PMT changes, replacing streams with
>    new ones. In that case, we need to accumulate the running time
>    from the previous chain in the segment base.
>    
>    https://bugzilla.gnome.org/show_bug.cgi?id=745102
>
>diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c
>index b7bae7d..a9cf88b 100644
>--- a/gst/mpegtsdemux/tsdemux.c
>+++ b/gst/mpegtsdemux/tsdemux.c
>@@ -1399,6 +1399,7 @@ gst_ts_demux_stream_added (MpegTSBase * base, >MpegTSBaseStream * bstream,
>     stream->active = FALSE;
> 
>     stream->need_newsegment = TRUE;
>+    demux->reset_segment = TRUE;
>     stream->needs_keyframe = FALSE;
>     stream->discont = TRUE;
>     stream->pts = GST_CLOCK_TIME_NONE;
>@@ -1957,7 +1958,7 @@ calculate_and_push_newsegment (GstTSDemux * demux, >TSDemuxStream * stream)
>       demux->segment = base->segment;
>     } else {
>       /* Start from the first ts/pts */
>-      GstClockTime base = demux->segment.base;
>+      GstClockTime base = base = demux->segment.position - >demux->segment.start;
>       gst_segment_init (&demux->segment, GST_FORMAT_TIME);
>       demux->segment.start = firstts;
>       demux->segment.stop = GST_CLOCK_TIME_NONE;

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list