From feb1e2434758e20701d93be8932926f6312e3181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20M=C3=A5rtensson?= Date: Mon, 18 Jun 2018 10:44:55 +0200 Subject: [PATCH] audiosink: fix resuming after pause For resuming after paused, gst_audio_sink_ring_buffer_start() needs to be called to notify the ringbuffer to continue to play. --- gst-libs/gst/audio/gstaudiosink.c | 6 +++--- gst-libs/gst/audio/gstaudiosink.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/gst-libs/gst/audio/gstaudiosink.c b/gst-libs/gst/audio/gstaudiosink.c index 5eb6039baf..c6de9e97bf 100644 --- a/gst-libs/gst/audio/gstaudiosink.c +++ b/gst-libs/gst/audio/gstaudiosink.c @@ -560,10 +560,10 @@ gst_audio_sink_ring_buffer_resume (GstAudioRingBuffer * buf) GST_DEBUG_OBJECT (sink, "resume..."); csink->resume (sink); GST_DEBUG_OBJECT (sink, "resume done"); - } else { - /* fallback to start for audio sinks that don't provide resume */ - gst_audio_sink_ring_buffer_start (buf); } + + gst_audio_sink_ring_buffer_start (buf); + return TRUE; } diff --git a/gst-libs/gst/audio/gstaudiosink.h b/gst-libs/gst/audio/gstaudiosink.h index 409cf6b017..e54094be59 100644 --- a/gst-libs/gst/audio/gstaudiosink.h +++ b/gst-libs/gst/audio/gstaudiosink.h @@ -78,8 +78,6 @@ struct _GstAudioSink { * For retro compatibility, the audio sink will fallback * to calling reset if this vmethod is not provided. * @resume: Resume the device. - * For retro compatibility, the audio sink will fallback - * to calling start if this vmethod is not provided. * @stop: Stop the device and unblock write as fast as possible. * Pending samples are flushed from the device. * For retro compatibility, the audio sink will fallback