From 7f937c99d458ba73e20348fc4e069bbc52675a99 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 24 Nov 2008 12:56:54 +0000 Subject: [PATCH] gst-libs/gst/audio/gstbaseaudiosink.c: Add one log message to check for audio_drained. Sync one log message with the ... Original commit message from CVS: * gst-libs/gst/audio/gstbaseaudiosink.c: Add one log message to check for audio_drained. Sync one log message with the condition. Send EOS after draining audio in pull mode. --- ChangeLog | 6 ++++++ gst-libs/gst/audio/gstbaseaudiosink.c | 14 ++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index a5a097a..b33e764 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-24 Stefan Kost + + * gst-libs/gst/audio/gstbaseaudiosink.c: + Add one log message to check for audio_drained. Sync one log message + with the condition. Send EOS after draining audio in pull mode. + 2008-11-24 Sebastian Dröge * ext/gio/gstgiobasesrc.c: (gst_gio_base_src_create): diff --git a/gst-libs/gst/audio/gstbaseaudiosink.c b/gst-libs/gst/audio/gstbaseaudiosink.c index a607b03..27cc66c 100644 --- a/gst-libs/gst/audio/gstbaseaudiosink.c +++ b/gst-libs/gst/audio/gstbaseaudiosink.c @@ -751,6 +751,7 @@ gst_base_audio_sink_drain (GstBaseAudioSink * sink) gst_base_sink_wait_eos (GST_BASE_SINK (sink), time, NULL); sink->next_sample = -1; + GST_DEBUG_OBJECT (sink, "drained audio"); } return TRUE; } @@ -857,8 +858,8 @@ clock_convert_external (GstClockTime external, GstClockTime cinternal, gst_util_uint64_scale (external - cexternal, crate_denom, crate_num); external += cinternal; } else { - external = gst_util_uint64_scale (cexternal - external, - crate_denom, crate_num); + external = + gst_util_uint64_scale (cexternal - external, crate_denom, crate_num); if (cinternal > external) external = cinternal - external; else @@ -1625,8 +1626,9 @@ gst_base_audio_sink_callback (GstRingBuffer * rbuf, guint8 * data, guint len, goto preroll_error; if (len != GST_BUFFER_SIZE (buf)) { - GST_INFO_OBJECT (basesink, "short read pulling from sink pad: %d<%d", - len, GST_BUFFER_SIZE (buf)); + GST_INFO_OBJECT (basesink, + "got different size than requested from sink pad: %u != %u", len, + GST_BUFFER_SIZE (buf)); len = MIN (GST_BUFFER_SIZE (buf), len); } @@ -1653,10 +1655,10 @@ eos: * the sink gets shut down; maybe we should set a flag somewhere, or * set segment.stop and segment.duration to the last sample or so */ GST_DEBUG_OBJECT (sink, "EOS"); - gst_element_post_message (GST_ELEMENT_CAST (sink), - gst_message_new_eos (GST_OBJECT_CAST (sink))); gst_base_audio_sink_drain (sink); gst_ring_buffer_pause (rbuf); + gst_element_post_message (GST_ELEMENT_CAST (sink), + gst_message_new_eos (GST_OBJECT_CAST (sink))); GST_PAD_STREAM_UNLOCK (basesink->sinkpad); } flushing: -- 2.7.4