diff options
author | Edward Hervey <edward@centricular.com> | 2016-03-08 11:41:49 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2016-03-08 15:13:40 +0100 |
commit | 215c9eb71aa6afde477e0300c79102a2f4da2e0b (patch) | |
tree | 069615635e845e11c72d822d5ae8becaf25537bf | |
parent | a68c8978a6be3695c3b1c4e2c0af6911c0221749 (diff) | |
download | gstreamer-plugins-bad-215c9eb71aa6afde477e0300c79102a2f4da2e0b.tar.gz |
tsdemux: Don't reset/recalculate segments with accurate seeks
When dealing with accurate seeks, we must send out a segment which
is exactly what is requested.
https://bugzilla.gnome.org/show_bug.cgi?id=763262
-rw-r--r-- | gst/mpegtsdemux/tsdemux.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index b54a7d371..8eaf9a798 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -861,8 +861,8 @@ gst_ts_demux_do_seek (MpegTSBase * base, GstEvent * event) gst_segment_do_seek (&demux->segment, rate, format, flags, start_type, start, stop_type, stop, NULL); - if (!(flags & GST_SEEK_FLAG_ACCURATE)) - demux->reset_segment = TRUE; + /* Reset segment if we're not doing an accurate seek */ + demux->reset_segment = (!(flags & GST_SEEK_FLAG_ACCURATE)); if (demux->segment_event) { gst_event_unref (demux->segment_event); @@ -1618,7 +1618,8 @@ gst_ts_demux_stream_added (MpegTSBase * base, MpegTSBaseStream * bstream, stream->active = FALSE; stream->need_newsegment = TRUE; - demux->reset_segment = TRUE; + /* Reset segment if we're not doing an accurate seek */ + demux->reset_segment = (!(demux->segment.flags & GST_SEEK_FLAG_ACCURATE)); stream->needs_keyframe = FALSE; stream->discont = TRUE; stream->pts = GST_CLOCK_TIME_NONE; |