flvdemux: Clear adapter on discontinuities
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Sun, 6 Jun 2010 13:17:00 +0000 (15:17 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Sun, 6 Jun 2010 13:17:00 +0000 (15:17 +0200)
gst/flv/gstflvdemux.c

index 35bbc42dac1e599eb523a26a5e45735e7c8afb46..69876c9b879dd7f20d4518da91883673ab1cd90d 100644 (file)
@@ -1621,6 +1621,11 @@ gst_flv_demux_chain (GstPad * pad, GstBuffer * buffer)
     demux->offset = GST_BUFFER_OFFSET (buffer);
   }
 
+  if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT)) {
+    GST_DEBUG_OBJECT (demux, "Discontinuity");
+    gst_adapter_clear (demux->adapter);
+  }
+
   gst_adapter_push (demux->adapter, buffer);
 
   if (demux->seeking) {