mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +00:00
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
1 changed files with 6 additions and 0 deletions
|
@ -847,6 +847,12 @@ gst_audio_base_sink_setcaps (GstBaseSink * bsink, GstCaps * caps)
|
||||||
|
|
||||||
spec = &sink->ringbuffer->spec;
|
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");
|
GST_DEBUG_OBJECT (sink, "release old ringbuffer");
|
||||||
|
|
||||||
/* get current time, updates the last_time. When the subclass has a clock that
|
/* get current time, updates the last_time. When the subclass has a clock that
|
||||||
|
|
Loading…
Reference in a new issue