From 39d7d438c672cff1cdc0a25ec59ff59fd55ddc68 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Mon, 21 Jul 2014 18:21:41 +0200 Subject: [PATCH] tsdemux: Do not scan for a keyframe in non-accurate mode. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733490 --- gst/mpegtsdemux/tsdemux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index 7f2d255191..21e6bbaed0 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -836,7 +836,9 @@ gst_ts_demux_do_seek (MpegTSBase * base, GstEvent * event) for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) { TSDemuxStream *stream = tmp->data; - stream->needs_keyframe = TRUE; + + if (flags & GST_SEEK_FLAG_ACCURATE) + stream->needs_keyframe = TRUE; stream->seeked_pts = GST_CLOCK_TIME_NONE; stream->seeked_dts = GST_CLOCK_TIME_NONE; @@ -1395,6 +1397,7 @@ gst_ts_demux_stream_added (MpegTSBase * base, MpegTSBaseStream * bstream, stream->active = FALSE; stream->need_newsegment = TRUE; + stream->needs_keyframe = FALSE; stream->discont = TRUE; stream->pts = GST_CLOCK_TIME_NONE; stream->dts = GST_CLOCK_TIME_NONE;