summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Rosengren <robertr@axis.com>2023-03-30 16:09:06 +0200
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2023-03-31 16:51:11 +0000
commit6bb1257c993dc394fcfbe67908c3da5c00c55d25 (patch)
tree305b6492b1b962b60d813cced97c15bf20d2f027
parent17d1e5d6275ff7e5e0b4859a3c200efccca1bb0c (diff)
alsasink: Fix for being stuck in stop_streaming_threads state
Moving from PLAYING to NULL will set the stop_streaming_threads to TRUE, but when moving back upwards its not reset to FALSE (as only done in uncalled init and resume callbacks). Fix by reseting value in the prepare callback. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4309>
-rw-r--r--subprojects/gst-plugins-base/ext/alsa/gstalsasink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/subprojects/gst-plugins-base/ext/alsa/gstalsasink.c b/subprojects/gst-plugins-base/ext/alsa/gstalsasink.c
index b5a70a9a5f..6165b4f9dc 100644
--- a/subprojects/gst-plugins-base/ext/alsa/gstalsasink.c
+++ b/subprojects/gst-plugins-base/ext/alsa/gstalsasink.c
@@ -259,7 +259,7 @@ gst_alsasink_init (GstAlsaSink * alsasink)
alsasink->is_paused = FALSE;
alsasink->after_paused = FALSE;
alsasink->hw_support_pause = FALSE;
- alsasink->stop_streaming_threads = FALSE;
+ alsasink->stop_streaming_threads = TRUE;
g_mutex_init (&alsasink->alsa_lock);
g_mutex_init (&alsasink->delay_lock);
@@ -943,6 +943,7 @@ gst_alsasink_prepare (GstAudioSink * asink, GstAudioRingBufferSpec * spec)
alsa->channels, GST_AUDIO_BASE_SINK (alsa)->ringbuffer);
#endif /* SND_CHMAP_API_VERSION */
+ alsa->stop_streaming_threads = FALSE;
return TRUE;
/* ERRORS */