Files
meta-tegra/recipes-multimedia/gstreamer/gstreamer1.0-plugins-nvvideo4linux2-1.14.0-r36.4.3/0003-v4l2bufferpool-Avoid-set_flushing-warning.patch
2025-04-19 04:26:13 -07:00

44 lines
1.5 KiB
Diff

From 3502b229347c8afff015d309614aa76bba4e83b9 Mon Sep 17 00:00:00 2001
From: Ilies CHERGUI <ichergui@nvidia.com>
Date: Fri, 17 Nov 2023 12:56:24 +0000
Subject: [PATCH 3/7] v4l2bufferpool: Avoid set_flushing warning
The gst_buffer_pool_set_flushing() warns when that function is called
on an inactive pool. Avoid the warning by checking the state, this is
similar to what we do in gst_v4l2_object_unlock().
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/649>
Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/649]
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
---
gstv4l2bufferpool.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gstv4l2bufferpool.c b/gstv4l2bufferpool.c
index 35cbb91..6303ff0 100644
--- a/gstv4l2bufferpool.c
+++ b/gstv4l2bufferpool.c
@@ -1301,7 +1301,7 @@ gst_v4l2_buffer_pool_flush_start (GstBufferPool * bpool)
g_cond_broadcast (&pool->empty_cond);
GST_OBJECT_UNLOCK (pool);
- if (pool->other_pool)
+ if (pool->other_pool && gst_buffer_pool_is_active (pool->other_pool))
gst_buffer_pool_set_flushing (pool->other_pool, TRUE);
}
@@ -1312,7 +1312,7 @@ gst_v4l2_buffer_pool_flush_stop (GstBufferPool * bpool)
GST_DEBUG_OBJECT (pool, "stop flushing");
- if (pool->other_pool)
+ if (pool->other_pool && gst_buffer_pool_is_active (pool->other_pool))
gst_buffer_pool_set_flushing (pool->other_pool, FALSE);
#ifndef USE_V4L2_TARGET_NV
--
2.25.1