From 1b8e76d235f4adc42fdbc2f4b63f822d74097622 Mon Sep 17 00:00:00 2001 From: Jesper Larsen Date: Mon, 29 Sep 2014 10:01:27 +0200 Subject: [PATCH] tsdemux: do not discard on discont if PES start If a discontinuity in the stream is detected, data is discarded until a new PES starts. If the first packet after the discontinuity is also the start of a PES, there is no reason to discard the packets. https://bugzilla.gnome.org/show_bug.cgi?id=737569 --- gst/mpegtsdemux/tsdemux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index 23c35d2acf..bd196c37b5 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -1850,7 +1850,8 @@ gst_ts_demux_queue_data (GstTSDemux * demux, TSDemuxStream * stream, } else { GST_WARNING ("CONTINUITY: Mismatch packet %d, stream %d", cc, stream->continuity_counter); - stream->state = PENDING_PACKET_DISCONT; + if (stream->state != PENDING_PACKET_EMPTY) + stream->state = PENDING_PACKET_DISCONT; } stream->continuity_counter = cc;