summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2023-04-17 16:05:35 -0400
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2023-05-02 14:42:43 +0000
commit8e4dc8937169dbd52e14be1f2a9ef2d1bac1ffd2 (patch)
tree9f5ec09e6f764550f3f627b2e50eda2d06fe659e
parent642103fdcc7f29facf1295d09dd9f79248d1fa80 (diff)
downloadgstreamer-8e4dc8937169dbd52e14be1f2a9ef2d1bac1ffd2.tar.gz
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4525>
-rw-r--r--subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2bufferpool.c
index 3f28305324..814a3a9943 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);