From 1b4b8a9322703803d85915f75b7cbf866f94ad6d Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 4 Jun 2020 20:29:41 +0200 Subject: [PATCH] gst: check for NULL stream The stream can already be closed when the buffers are recycled. Fixes: #243 --- src/gst/gstpipewiresrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gst/gstpipewiresrc.c b/src/gst/gstpipewiresrc.c index 206d7239d..cdc709023 100644 --- a/src/gst/gstpipewiresrc.c +++ b/src/gst/gstpipewiresrc.c @@ -377,7 +377,8 @@ buffer_recycle (GstMiniObject *obj) GST_LOG_OBJECT (obj, "recycle buffer"); pw_thread_loop_lock (src->loop); - pw_stream_queue_buffer (src->stream, data->b); + if (src->stream) + pw_stream_queue_buffer (src->stream, data->b); pw_thread_loop_unlock (src->loop); return FALSE;