diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index b54a7d3711..8eaf9a798e 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;