summaryrefslogtreecommitdiff
path: root/gst/inter
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-11-04 13:46:46 +0100
committerSebastian Dröge <sebastian@centricular.com>2014-11-04 13:47:38 +0100
commit6a36b53831d4d187183a41f7983f32c488765c82 (patch)
tree7f87a976bbe3dfd86eb722aca575744548a71d9f /gst/inter
parent340d60e85e8a678da70bfac752ce90651b5d9fef (diff)
downloadgstreamer-plugins-bad-6a36b53831d4d187183a41f7983f32c488765c82.tar.gz
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.
Diffstat (limited to 'gst/inter')
-rw-r--r--gst/inter/gstinteraudiosink.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gst/inter/gstinteraudiosink.c b/gst/inter/gstinteraudiosink.c
index b6f2e64c4..ccc69fc7d 100644
--- a/gst/inter/gstinteraudiosink.c
+++ b/gst/inter/gstinteraudiosink.c
@@ -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;