aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-03-30 14:48:08 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-03-30 15:31:47 +0100
commit83c2d2470738b05a075ca2afc13d994343a83a3f (patch)
tree60e301d5563792eab4513df059ab1549f9afa3fe
parent84219e2b5d013709ee5259621715966c46eec746 (diff)
v4l2-ctl: suppress warning messages when decoding
When reading from a compressed file the amount of data read can be less than the buffer size. Don't warn about that, it's perfectly normal. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-streaming.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index 3695a027..85f97722 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -1108,7 +1108,7 @@ restart:
fprintf(stderr, "amount intended to be read/written is larger than the buffer size\n");
return false;
}
- if (first && sz != expected_len) {
+ if (first && sz != expected_len && fmt.g_bytesperline(j)) {
fprintf(stderr, "%s: size read (%u) is different than needed (%u) in the first frame\n",
__func__, sz, expected_len);
return false;
@@ -1123,9 +1123,8 @@ restart:
continue;
if (sz == 0)
return false;
- if (sz)
+ if (sz && fmt.g_bytesperline(j))
fprintf(stderr, "%u != %u\n", sz, expected_len);
- continue;
}
first = false;
return true;

Privacy Policy