mirror of
https://github.com/lingble/meta-tegra.git
synced 2025-10-28 19:12:39 +00:00
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
From 80d2084fe66e603fdb224eb06551b5ed61f05a3a Mon Sep 17 00:00:00 2001
|
|
From: Ilies CHERGUI <ichergui@nvidia.com>
|
|
Date: Fri, 17 Nov 2023 12:51:45 +0000
|
|
Subject: [PATCH 2/7] v4l2allocator: Fix data offset / bytesused size validation
|
|
|
|
The check was too strict causing spurious warning. Now check for <= so that 0
|
|
sized buffer do not cause a warning.
|
|
|
|
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>
|
|
---
|
|
gstv4l2allocator.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/gstv4l2allocator.c b/gstv4l2allocator.c
|
|
index 3fc4c39..6a53474 100644
|
|
--- a/gstv4l2allocator.c
|
|
+++ b/gstv4l2allocator.c
|
|
@@ -1505,7 +1505,7 @@ gst_v4l2_allocator_dqbuf (GstV4l2Allocator * allocator,
|
|
|
|
offset = group->planes[i].data_offset;
|
|
|
|
- if (group->planes[i].bytesused > group->planes[i].data_offset) {
|
|
+ if (group->planes[i].bytesused >= group->planes[i].data_offset) {
|
|
size = group->planes[i].bytesused - group->planes[i].data_offset;
|
|
} else {
|
|
GST_WARNING_OBJECT (allocator, "V4L2 provided buffer has bytesused %"
|
|
--
|
|
2.25.1
|
|
|