From 0344c50eafa5a1b1bc203808d8950e3b07e563e8 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Fri, 26 Jun 2020 09:53:13 -0400 Subject: [PATCH] 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: --- sys/v4l2/gstv4l2allocator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/v4l2/gstv4l2allocator.c b/sys/v4l2/gstv4l2allocator.c index 5d95e55296..4fa5d274fc 100644 --- a/sys/v4l2/gstv4l2allocator.c +++ b/sys/v4l2/gstv4l2allocator.c @@ -1363,7 +1363,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 %"