gst-libs/gst/audio/gstbaseaudiosink.c: Starting the ringbuffer when we did not acquire it can cause a deadlock, is po...

Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_event):
Starting the ringbuffer when we did not acquire it can cause
a deadlock, is pointless and causes nasty things for
subclasses.
Fixes gst-launch audiotestsrc num-buffers=0 ! alsasink.
This commit is contained in:
Wim Taymans 2006-04-10 17:05:46 +00:00
parent 2d61b8b8b7
commit 35058f78c1
2 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,12 @@
2006-04-10 Wim Taymans <wim@fluendo.com>
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_event):
Starting the ringbuffer when we did not acquire it can cause
a deadlock, is pointless and causes nasty things for
subclasses.
Fixes gst-launch audiotestsrc num-buffers=0 ! alsasink.
2006-04-10 Wim Taymans <wim@fluendo.com>
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_src_query),

View file

@ -402,8 +402,10 @@ gst_base_audio_sink_event (GstBaseSink * bsink, GstEvent * event)
gst_ring_buffer_set_flushing (sink->ringbuffer, FALSE);
break;
case GST_EVENT_EOS:
/* need to start playback when we reach EOS */
gst_ring_buffer_start (sink->ringbuffer);
/* need to start playback when we reach EOS, but only when
* we have successfully negotiated a format. */
if (gst_ring_buffer_is_acquired (sink->ringbuffer))
gst_ring_buffer_start (sink->ringbuffer);
/* now wait till we played everything */
gst_base_audio_sink_drain (sink);
break;