From 0247dc748972e9c869e63916df37640c09b701c2 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 9 Jul 2015 16:59:16 +0200 Subject: [PATCH] mpegtsbase: Flush more on DISCONT buffers in push mode When in push mode, we want to discard all previous observations from the mpegtspacketizer when we get a DISCONT buffer. This avoids trying to calculate bogus timestamps (estimating them using old PCR observations). We only do a hard reset in push-mode. In pull-mode we still need the observations (in order to seek properly) --- gst/mpegtsdemux/mpegtsbase.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/mpegtsdemux/mpegtsbase.c b/gst/mpegtsdemux/mpegtsbase.c index 4751028cdf..1836e9d83a 100644 --- a/gst/mpegtsdemux/mpegtsbase.c +++ b/gst/mpegtsdemux/mpegtsbase.c @@ -1110,7 +1110,7 @@ mpegts_base_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) return res; mpegts_base_flush (base, FALSE); - mpegts_packetizer_flush (base->packetizer, FALSE); + mpegts_packetizer_flush (base->packetizer, base->mode == BASE_MODE_PUSHING); } mpegts_packetizer_push (base->packetizer, buf);