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:
parent
d6dbb351c6
commit
def07410ef
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user