summaryrefslogtreecommitdiff
path: root/libavcodec/jpeglsdec.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2013-05-17 12:36:06 +0200
committerLuca Barbato <lu_zero@gentoo.org>2013-05-17 16:44:13 +0200
commita5a0ef5e13a59ff53318a45d77c5624b23229c6f (patch)
tree799c77f56cfa3fc9633f77691d87435f851fcf44 /libavcodec/jpeglsdec.c
parent2768f7e4fef56f2d48b4593b78e953098d456582 (diff)
jpegls: return meaningful errors
Diffstat (limited to 'libavcodec/jpeglsdec.c')
-rw-r--r--libavcodec/jpeglsdec.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index 6d884a4771..cec561226a 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
@@ -68,13 +68,13 @@ int ff_jpegls_decode_lse(MJpegDecodeContext *s)
case 2:
case 3:
av_log(s->avctx, AV_LOG_ERROR, "palette not supported\n");
- return -1;
+ return AVERROR(ENOSYS);
case 4:
av_log(s->avctx, AV_LOG_ERROR, "oversize image not supported\n");
- return -1;
+ return AVERROR(ENOSYS);
default:
av_log(s->avctx, AV_LOG_ERROR, "invalid id %d\n", id);
- return -1;
+ return AVERROR_INVALIDDATA;
}
av_dlog(s->avctx, "ID=%i, T=%i,%i,%i\n", id, s->t1, s->t2, s->t3);
@@ -346,11 +346,10 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
cur += s->picture_ptr->linesize[0];
}
} else if (ilv == 2) { /* sample interleaving */
- av_log(s->avctx, AV_LOG_ERROR,
- "Sample interleaved images are not supported.\n");
+ avpriv_report_missing_feature(s->avctx, "Sample interleaved images");
av_free(state);
av_free(zero);
- return -1;
+ return AVERROR_PATCHWELCOME;
}
if (shift) { /* we need to do point transform or normalize samples */