summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2016-10-08 12:08:06 (GMT)
committerEdward Hervey <bilboed@bilboed.com>2016-10-08 12:14:00 (GMT)
commitfb36608ccd95004b3c2b38d6451c009fbad899b6 (patch)
tree2f9d90011c339b35382015a5f22c7f86f3298431
parent4aadf50012cb057422f29644b41fcaa30c1a2dd2 (diff)
downloadgst-plugins-bad-fb36608ccd95004b3c2b38d6451c009fbad899b6.tar.gz
gst-plugins-bad-fb36608ccd95004b3c2b38d6451c009fbad899b6.tar.xz
mpegts: Also clear packetizer on TIME DISCONT
When dealing with TIME-based input, the incoming stream could have potentially changed completely. In order to check whether it did or not, we need to re-check all sections (PAT, PMT...). If it didn't, we will keep using the existing streams/pad, and if it did we will act as if there was a program switch. Fixes HLS streaming with decodebin3/playbin3
-rw-r--r--gst/mpegtsdemux/mpegtsbase.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/mpegtsdemux/mpegtsbase.c b/gst/mpegtsdemux/mpegtsbase.c
index 659faad..4aa01e3 100644
--- a/gst/mpegtsdemux/mpegtsbase.c
+++ b/gst/mpegtsdemux/mpegtsbase.c
@@ -1164,9 +1164,10 @@ mpegts_base_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
* we want to drop all previous observations (hard:TRUE) from
* the packetizer */
if (base->mode == BASE_MODE_PUSHING
- && base->segment.format == GST_FORMAT_TIME)
+ && base->segment.format == GST_FORMAT_TIME) {
mpegts_packetizer_flush (base->packetizer, TRUE);
- else
+ mpegts_packetizer_clear (base->packetizer);
+ } else
mpegts_packetizer_flush (base->packetizer, FALSE);
}