diff options
author | Edward Hervey <edward@centricular.com> | 2015-07-09 18:31:34 +0200 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2015-07-09 18:33:00 +0200 |
commit | 631b2d88262e28d6c96ec8a266536760b9e24bef (patch) | |
tree | afbdcfb8a1ec84cf804176de9328047c3b044c5d /gst/mpegtsdemux | |
parent | 0247dc748972e9c869e63916df37640c09b701c2 (diff) | |
download | gstreamer-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.c | 9 |
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); |