diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-05-17 12:36:06 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2013-06-22 08:39:58 +0200 |
commit | 2ebabfff4804c75b5212ae264a5f6005e417484c (patch) | |
tree | 74771d179dfb6364ef24f9222cab3b02c8ccbb35 | |
parent | a03dcec364747aea0c7e8c9fa2b5d00f5e799812 (diff) | |
download | ffmpeg-2ebabfff4804c75b5212ae264a5f6005e417484c.tar.gz |
jpegls: return meaningful errors
(cherry picked from commit a5a0ef5e13a59ff53318a45d77c5624b23229c6f)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Conflicts:
libavcodec/jpeglsdec.c
-rw-r--r-- | libavcodec/jpeglsdec.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c index a4cfe4f9d6..ca0224c906 100644 --- a/libavcodec/jpeglsdec.c +++ b/libavcodec/jpeglsdec.c @@ -71,13 +71,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_log(s->avctx, AV_LOG_DEBUG, "ID=%i, T=%i,%i,%i\n", id, s->t1, s->t2, s->t3); @@ -324,11 +324,11 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, int point_transfor last = cur; cur += s->picture_ptr->linesize[0]; } - } else if(ilv == 2) { /* sample interleaving */ + } else if (ilv == 2) { /* sample interleaving */ av_log(s->avctx, AV_LOG_ERROR, "Sample interleaved images are not supported.\n"); av_free(state); av_free(zero); - return -1; + return AVERROR_PATCHWELCOME; } if(shift){ /* we need to do point transform or normalize samples */ |