diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-16 11:43:41 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-16 11:43:41 -0300 |
commit | 91ccc2034f8716ede10392bfc5ec63ee611ae90b (patch) | |
tree | 7b4e58faf9795f5565ab263de98a1265d774c92d /v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert.c | |
parent | 355699a8648782af767ca46dcfe4330d54c01554 (diff) | |
parent | 9421ca72b55ed6cea1e47552070207878fd925c5 (diff) | |
download | mediapointer-dvb-s2-91ccc2034f8716ede10392bfc5ec63ee611ae90b.tar.gz mediapointer-dvb-s2-91ccc2034f8716ede10392bfc5ec63ee611ae90b.tar.bz2 |
merge: http://linuxtv.org/hg/~mkrufky/sms1xxx
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert.c')
-rw-r--r-- | v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert.c b/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert.c index cc733554c..6c6cb693d 100644 --- a/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert.c +++ b/v4l2-apps/lib/libv4l/libv4lconvert/libv4lconvert.c @@ -289,12 +289,13 @@ int v4lconvert_convert(struct v4lconvert_data *data, result = tinyjpeg_decode(data->jdec, TINYJPEG_FMT_YUV420P); } - if (result) { - V4LCONVERT_ERR("decompressing JPEG: %s\n", + /* If the JPEG header checked out ok and we get an error during actual + decompression, log the error, but don't return an errorcode to the + application, so that the user gets what we managed to decompress */ + if (result) + fprintf(stderr, "libv4lconvert: Error decompressing JPEG: %s", tinyjpeg_get_errorstring(data->jdec)); - errno = EIO; - return -1; - } + break; case V4L2_PIX_FMT_SBGGR8: @@ -363,6 +364,11 @@ int v4lconvert_convert(struct v4lconvert_data *data, v4lconvert_yuv420_to_bgr24(src, dest, dest_fmt->fmt.pix.width, dest_fmt->fmt.pix.height); break; + + default: + V4LCONVERT_ERR("Unknown src format in conversion\n"); + errno = EINVAL; + return -1; } return needed; |