summaryrefslogtreecommitdiff
path: root/gst/mpegtsdemux
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2015-07-09 18:31:34 +0200
committerEdward Hervey <bilboed@bilboed.com>2015-07-09 18:33:00 +0200
commit631b2d88262e28d6c96ec8a266536760b9e24bef (patch)
treeafbdcfb8a1ec84cf804176de9328047c3b044c5d /gst/mpegtsdemux
parent0247dc748972e9c869e63916df37640c09b701c2 (diff)
downloadgstreamer-plugins-bad-631b2d88262e28d6c96ec8a266536760b9e24bef.tar.gz
mpegtsbase: Fix previous commit
We only want to do a hard reset of the observations if we're working with TIME segments in push mode. For BYTE segment we want to keep the observations (in order to do seeks in push-mode).
Diffstat (limited to 'gst/mpegtsdemux')
-rw-r--r--gst/mpegtsdemux/mpegtsbase.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gst/mpegtsdemux/mpegtsbase.c b/gst/mpegtsdemux/mpegtsbase.c
index 1836e9d83..9b8e897a3 100644
--- a/gst/mpegtsdemux/mpegtsbase.c
+++ b/gst/mpegtsdemux/mpegtsbase.c
@@ -1110,7 +1110,14 @@ mpegts_base_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
return res;
mpegts_base_flush (base, FALSE);
- mpegts_packetizer_flush (base->packetizer, base->mode == BASE_MODE_PUSHING);
+ /* In the case of discontinuities in push-mode with TIME segment
+ * we want to drop all previous observations (hard:TRUE) from
+ * the packetizer */
+ if (base->mode == BASE_MODE_PUSHING
+ && base->segment.format == GST_FORMAT_TIME)
+ mpegts_packetizer_flush (base->packetizer, TRUE);
+ else
+ mpegts_packetizer_flush (base->packetizer, FALSE);
}
mpegts_packetizer_push (base->packetizer, buf);