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
This commit is contained in:
Edward Hervey 2016-03-08 11:41:49 +01:00 committed by Edward Hervey
parent a68c8978a6
commit 215c9eb71a

View file

@ -861,8 +861,8 @@ gst_ts_demux_do_seek (MpegTSBase * base, GstEvent * event)
gst_segment_do_seek (&demux->segment, rate, format, flags, start_type, gst_segment_do_seek (&demux->segment, rate, format, flags, start_type,
start, stop_type, stop, NULL); start, stop_type, stop, NULL);
if (!(flags & GST_SEEK_FLAG_ACCURATE)) /* Reset segment if we're not doing an accurate seek */
demux->reset_segment = TRUE; demux->reset_segment = (!(flags & GST_SEEK_FLAG_ACCURATE));
if (demux->segment_event) { if (demux->segment_event) {
gst_event_unref (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->active = FALSE;
stream->need_newsegment = TRUE; 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->needs_keyframe = FALSE;
stream->discont = TRUE; stream->discont = TRUE;
stream->pts = GST_CLOCK_TIME_NONE; stream->pts = GST_CLOCK_TIME_NONE;