From 6a20747e8362f9ad67bf5d604dc32a25a8c07861 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 16 Oct 2007 15:33:31 +0000 Subject: [PATCH] gst-libs/gst/audio/gstbaseaudiosink.c: Also explicitly release the ringbuffer when going to NULL because it is requir... Original commit message from CVS: * gst-libs/gst/audio/gstbaseaudiosink.c: (gst_base_audio_sink_drain), (gst_base_audio_sink_change_state): Also explicitly release the ringbuffer when going to NULL because it is required in the setcaps function, before the state change to PAUSED completes. --- ChangeLog | 8 ++++++++ gst-libs/gst/audio/gstbaseaudiosink.c | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index f482ea355c..286a14a3ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-10-16 Wim Taymans + + * gst-libs/gst/audio/gstbaseaudiosink.c: + (gst_base_audio_sink_drain), (gst_base_audio_sink_change_state): + Also explicitly release the ringbuffer when going to NULL because it + is required in the setcaps function, before the state change to PAUSED + completes. + 2007-10-16 Tim-Philipp Müller * tests/icles/.cvsignore: diff --git a/gst-libs/gst/audio/gstbaseaudiosink.c b/gst-libs/gst/audio/gstbaseaudiosink.c index b668ef8f56..413b7d2212 100644 --- a/gst-libs/gst/audio/gstbaseaudiosink.c +++ b/gst-libs/gst/audio/gstbaseaudiosink.c @@ -1377,6 +1377,11 @@ gst_base_audio_sink_change_state (GstElement * element, gst_ring_buffer_release (sink->ringbuffer); break; case GST_STATE_CHANGE_READY_TO_NULL: + /* we release again here because the aqcuire happens when setting the + * caps, which happens before we commit the state to PAUSED and thus the + * PAUSED->READY state change (see above, where we release the ringbuffer) + * might not be called when we get here. */ + gst_ring_buffer_release (sink->ringbuffer); gst_ring_buffer_close_device (sink->ringbuffer); break; default: