Commit 0344c50e authored by Nicolas Dufresne's avatar Nicolas Dufresne Committed by GStreamer Merge Bot

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: <!649>
parent dbdbcfe7
...@@ -1363,7 +1363,7 @@ gst_v4l2_allocator_dqbuf (GstV4l2Allocator * allocator, ...@@ -1363,7 +1363,7 @@ gst_v4l2_allocator_dqbuf (GstV4l2Allocator * allocator,
offset = group->planes[i].data_offset; 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; size = group->planes[i].bytesused - group->planes[i].data_offset;
} else { } else {
GST_WARNING_OBJECT (allocator, "V4L2 provided buffer has bytesused %" GST_WARNING_OBJECT (allocator, "V4L2 provided buffer has bytesused %"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment