interaudiosink: Flush the adapter when we get new caps

Ideally we would drain the source but that would require more coordination
between sink and source than what we currently have.
This commit is contained in:
Sebastian Dröge 2014-11-04 13:46:46 +01:00
parent 340d60e85e
commit 6a36b53831

View file

@ -238,6 +238,8 @@ gst_inter_audio_sink_set_caps (GstBaseSink * sink, GstCaps * caps)
g_mutex_lock (&interaudiosink->surface->mutex);
interaudiosink->surface->audio_info = info;
interaudiosink->info = info;
/* TODO: Ideally we would drain the source here */
gst_adapter_clear (interaudiosink->surface->audio_adapter);
g_mutex_unlock (&interaudiosink->surface->mutex);
return TRUE;