From 77ff8c9fdb48e2a4ac699a6ab1ceeab9a1ec28b6 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 28 Feb 2006 11:06:24 +0000 Subject: [PATCH] gst-libs/gst/audio/gstbaseaudiosink.c: Don't try to provide a clock in the NULL state. Original commit message from CVS: * gst-libs/gst/audio/gstbaseaudiosink.c: (gst_base_audio_sink_provide_clock): Don't try to provide a clock in the NULL state. --- ChangeLog | 6 ++++++ gst-libs/gst/audio/gstbaseaudiosink.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index db3f6ef4233..e0b95338b65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-02-28 Wim Taymans + + * gst-libs/gst/audio/gstbaseaudiosink.c: + (gst_base_audio_sink_provide_clock): + Don't try to provide a clock in the NULL state. + 2006-02-28 Wim Taymans * ext/ogg/gstoggdemux.c: (gst_ogg_demux_receive_event), diff --git a/gst-libs/gst/audio/gstbaseaudiosink.c b/gst-libs/gst/audio/gstbaseaudiosink.c index 58ff3e3cca1..26026cb901e 100644 --- a/gst-libs/gst/audio/gstbaseaudiosink.c +++ b/gst-libs/gst/audio/gstbaseaudiosink.c @@ -181,6 +181,10 @@ gst_base_audio_sink_provide_clock (GstElement * elem) sink = GST_BASE_AUDIO_SINK (elem); + /* we have no ringbuffer (must be NULL state */ + if (sink->ringbuffer == NULL) + goto wrong_state; + if (!gst_ring_buffer_is_acquired (sink->ringbuffer)) goto wrong_state;