summaryrefslogtreecommitdiff
path: root/v4l2-apps
diff options
context:
space:
mode:
Diffstat (limited to 'v4l2-apps')
-rw-r--r--v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c4
-rw-r--r--v4l2-apps/libv4l/libv4lconvert/ov518-decomp.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
index fe3185018..998bc154d 100644
--- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
+++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
@@ -658,7 +658,7 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data,
if (v4lconvert_helper_decompress(data, LIBDIR "/libv4l/ov511-decomp",
src, src_size, d, d_size, width, height, yvu)) {
/* Corrupt frame, better get another one */
- errno = -EAGAIN;
+ errno = EAGAIN;
return -1;
}
break;
@@ -666,7 +666,7 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data,
if (v4lconvert_helper_decompress(data, LIBDIR "/libv4l/ov518-decomp",
src, src_size, d, d_size, width, height, yvu)) {
/* Corrupt frame, better get another one */
- errno = -EAGAIN;
+ errno = EAGAIN;
return -1;
}
break;
diff --git a/v4l2-apps/libv4l/libv4lconvert/ov518-decomp.c b/v4l2-apps/libv4l/libv4lconvert/ov518-decomp.c
index f8f37649e..51b8d8c60 100644
--- a/v4l2-apps/libv4l/libv4lconvert/ov518-decomp.c
+++ b/v4l2-apps/libv4l/libv4lconvert/ov518-decomp.c
@@ -1325,7 +1325,7 @@ decompress420NoMMXOV518(unsigned char *pIn,
return 1;
/* Did we decode enough? */
- if (cinfo->bytes >= cinfo->rawLen - 897)
+ if (cinfo->bytes >= cinfo->rawLen - (897 + 64))
return 0;
else
return 1;
@@ -1420,7 +1420,8 @@ static int v4lconvert_ov518_to_yuv420(unsigned char *src, unsigned char *dst,
return -1;
/* Decompress, skipping the 8-byte SOF header */
- decompress420NoMMXOV518(src + 8, dst, pTmp, w, h, numpix, &cinfo, yvu);
+ if (decompress420NoMMXOV518(src + 8, dst, pTmp, w, h, numpix, &cinfo, yvu))
+ return -1;
return 0;
}