audiomixer: Don't reset caps on flush
authorOlivier CrĂȘte <olivier.crete@collabora.com>
Wed, 21 Jan 2015 23:39:24 +0000 (18:39 -0500)
committerThibault Saunier <tsaunier@gnome.org>
Thu, 29 Jan 2015 09:24:18 +0000 (10:24 +0100)
A flush event doesn't invalidate the previous caps event.

https://bugzilla.gnome.org/show_bug.cgi?id=742684

gst/audiomixer/gstaudiomixer.c

index 01521e5..44ec155 100644 (file)
@@ -751,7 +751,11 @@ gst_audiomixer_stop (GstAggregator * agg)
 static GstFlowReturn
 gst_audiomixer_flush (GstAggregator * agg)
 {
-  gst_audiomixer_reset (GST_AUDIO_MIXER (agg));
+  GstAudioMixer *audiomixer = GST_AUDIO_MIXER (agg);
+
+  audiomixer->offset = 0;
+  agg->segment.position = -1;
+  gst_buffer_replace (&audiomixer->current_buffer, NULL);
 
   return GST_FLOW_OK;
 }