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>
This commit is contained in:
Nicolas Dufresne 2020-06-26 09:53:13 -04:00 committed by GStreamer Merge Bot
parent dbdbcfe7ff
commit 0344c50eaf

View file

@ -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 %"