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)
This commit is contained in:
Edward Hervey 2015-07-09 16:59:16 +02:00
parent 22df1aefd8
commit 0247dc7489

View file

@ -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);