From 4dded209297464e329feb83ca19e9db602620824 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Mon, 17 Apr 2023 16:05:35 -0400 Subject: [PATCH] v4l2: bufferpool: Don't assert when orphaning is not needed This may happen when shutting down and should not cause any harm. This removes the associated assert when shutting down the pipeline, notably with CTRL+C. Part-of: --- subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.c index edb0016301..bdfd442cfa 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.c +++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.c @@ -1032,7 +1032,9 @@ gst_v4l2_buffer_pool_orphan (GstV4l2Object * v4l2object) GstV4l2BufferPool *pool; gboolean ret; - g_return_val_if_fail (bpool, FALSE); + /* Nothing to do if there is no pool */ + if (!bpool) + return TRUE; pool = GST_V4L2_BUFFER_POOL (bpool);