audiobasesink: Avoid resetting ringbuffer when not needed

If the ringbuffer was configured to the same caps as previously, we
don't need to reconfigure it.
This commit is contained in:
Edward Hervey 2012-08-14 18:53:04 +02:00
parent d6dbb351c6
commit def07410ef

View file

@ -847,6 +847,12 @@ gst_audio_base_sink_setcaps (GstBaseSink * bsink, GstCaps * caps)
spec = &sink->ringbuffer->spec;
if (G_UNLIKELY (spec->caps && gst_caps_is_equal (spec->caps, caps))) {
GST_DEBUG_OBJECT (sink,
"Ringbuffer caps haven't changed, skipping reconfiguration");
return TRUE;
}
GST_DEBUG_OBJECT (sink, "release old ringbuffer");
/* get current time, updates the last_time. When the subclass has a clock that