audiosink: fix resuming after pause
authorAxel MÃ¥rtensson <axelma@axis.com>
Mon, 18 Jun 2018 08:44:55 +0000 (10:44 +0200)
committerRobert Rosengren <robertr@axis.com>
Fri, 27 Sep 2019 05:34:57 +0000 (05:34 +0000)
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
gst-libs/gst/audio/gstaudiosink.h

index 5eb6039..c6de9e9 100644 (file)
@@ -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;
 }
 
index 409cf6b..e54094b 100644 (file)
@@ -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