From 6a5293d06574278750da926c409c1ca03402d6cc Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 31 May 2005 11:38:10 +0000 Subject: [PATCH] gst-libs/gst/audio/gstringbuffer.c: Don't try to call the delay method when the device is not opened. Original commit message from CVS: * gst-libs/gst/audio/gstringbuffer.c: (gst_ringbuffer_delay): Don't try to call the delay method when the device is not opened. --- ChangeLog | 6 ++++++ gst-libs/gst/audio/gstringbuffer.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6218e43..9bcc87d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2005-05-31 Wim Taymans + * gst-libs/gst/audio/gstringbuffer.c: (gst_ringbuffer_delay): + Don't try to call the delay method when the device is not + opened. + +2005-05-31 Wim Taymans + * ext/alsa/gstalsasink.c: (set_hwparams), (gst_alsasink_open): Get actual segment size and buffer size after opening the device. diff --git a/gst-libs/gst/audio/gstringbuffer.c b/gst-libs/gst/audio/gstringbuffer.c index 9b13a20..36df08e 100644 --- a/gst-libs/gst/audio/gstringbuffer.c +++ b/gst-libs/gst/audio/gstringbuffer.c @@ -431,6 +431,9 @@ gst_ringbuffer_delay (GstRingBuffer * buf) g_return_val_if_fail (buf != NULL, 0); + if (!gst_ringbuffer_is_acquired (buf)) + return 0; + rclass = GST_RINGBUFFER_GET_CLASS (buf); if (rclass->delay) res = rclass->delay (buf); -- 2.7.4