mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
audiobasesrc: Fix ringbuffer handling when settings caps
ringbuffer was released after setting values to its spec field in gst_audio_base_src_setcaps(). This led to failure in case gst_audio_base_src_setcaps() is called more than one time. https://bugzilla.gnome.org/show_bug.cgi?id=696540
This commit is contained in:
parent
052a1d0f1e
commit
78a8531c75
1 changed files with 3 additions and 4 deletions
|
@ -534,6 +534,9 @@ gst_audio_base_src_setcaps (GstBaseSrc * bsrc, GstCaps * caps)
|
|||
GstAudioRingBufferSpec *spec;
|
||||
gint bpf, rate;
|
||||
|
||||
GST_DEBUG ("release old ringbuffer");
|
||||
gst_audio_ring_buffer_release (src->ringbuffer);
|
||||
|
||||
spec = &src->ringbuffer->spec;
|
||||
|
||||
spec->buffer_time = src->buffer_time;
|
||||
|
@ -554,10 +557,6 @@ gst_audio_base_src_setcaps (GstBaseSrc * bsrc, GstCaps * caps)
|
|||
|
||||
GST_OBJECT_UNLOCK (src);
|
||||
|
||||
GST_DEBUG ("release old ringbuffer");
|
||||
|
||||
gst_audio_ring_buffer_release (src->ringbuffer);
|
||||
|
||||
gst_audio_ring_buffer_debug_spec_buff (spec);
|
||||
|
||||
GST_DEBUG ("acquire new ringbuffer");
|
||||
|
|
Loading…
Reference in a new issue