From 1355459057430408f0b96e08da98d51b0d1c1818 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 12 Oct 2005 12:38:20 +0000 Subject: [PATCH] gst-libs/gst/audio/gstringbuffer.c: Don't assert on normal stuff. Original commit message from CVS: * gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_commit), (gst_ring_buffer_read), (gst_ring_buffer_clear): Don't assert on normal stuff. * gst/playback/gstplaybin.c: (do_playbin_seek): API fix. --- ChangeLog | 9 +++++++++ gst-libs/gst/audio/gstringbuffer.c | 5 ++++- gst/playback/gstplaybin.c | 4 +--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 269d5ce..a145684 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2005-10-12 Wim Taymans + * gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_commit), + (gst_ring_buffer_read), (gst_ring_buffer_clear): + Don't assert on normal stuff. + + * gst/playback/gstplaybin.c: (do_playbin_seek): + API fix. + +2005-10-12 Wim Taymans + * check/pipelines/simple_launch_lines.c: (run_pipeline): * examples/seeking/Makefile.am: * examples/seeking/cdplayer.c: (play_cb), (pause_cb), (stop_cb): diff --git a/gst-libs/gst/audio/gstringbuffer.c b/gst-libs/gst/audio/gstringbuffer.c index 274d326..6aa866c 100644 --- a/gst-libs/gst/audio/gstringbuffer.c +++ b/gst-libs/gst/audio/gstringbuffer.c @@ -1204,7 +1204,10 @@ gst_ring_buffer_clear (GstRingBuffer * buf, gint segment) guint8 *data; g_return_if_fail (buf != NULL); - g_return_if_fail (buf->data != NULL); + /* no data means it's allready cleared */ + if (buf->data == NULL) + return; + g_return_if_fail (buf->empty_seg != NULL); data = GST_BUFFER_DATA (buf->data); diff --git a/gst/playback/gstplaybin.c b/gst/playback/gstplaybin.c index aa489d8..ea3c9a5 100644 --- a/gst/playback/gstplaybin.c +++ b/gst/playback/gstplaybin.c @@ -897,12 +897,10 @@ do_playbin_seek (GstElement * element, GstEvent * event) if (flush) { GstState state; - GTimeVal timeout; - GST_TIME_TO_TIMEVAL (0, timeout); /* need to call _get_state() since a bin state is only updated * with this call. */ - gst_element_get_state (element, &state, NULL, &timeout); + gst_element_get_state (element, &state, NULL, 0); was_playing = state == GST_STATE_PLAYING; if (was_playing) { -- 2.7.4