Port a change from audiobasesink from
def07410, to ignore setcaps
when the caps don't actually change, and avoid a reconfiguration
and reset of the ringbuffer in that case.
GstAudioRingBufferSpec *spec;
gint bpf, rate;
+ spec = &src->ringbuffer->spec;
+
+ if (G_UNLIKELY (spec->caps && gst_caps_is_equal (spec->caps, caps))) {
+ GST_DEBUG_OBJECT (src,
+ "Ringbuffer caps haven't changed, skipping reconfiguration");
+ return TRUE;
+ }
+
GST_DEBUG ("release old ringbuffer");
gst_audio_ring_buffer_release (src->ringbuffer);
- spec = &src->ringbuffer->spec;
-
spec->buffer_time = src->buffer_time;
spec->latency_time = src->latency_time;