From: Nicolas Dufresne Date: Mon, 17 Apr 2023 20:05:35 +0000 (-0400) Subject: v4l2: bufferpool: Don't assert when orphaning is not needed X-Git-Tag: 1.22.7~314 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e4dc8937169dbd52e14be1f2a9ef2d1bac1ffd2;p=platform%2Fupstream%2Fgstreamer.git 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: --- diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.c index 3f28305..814a3a9 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.c +++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.c @@ -1030,7 +1030,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);