diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-27 21:02:13 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-12-06 12:40:50 +0100 |
commit | b6932f64343815e988e1f977f0bd099271cb6478 (patch) | |
tree | 592541d167a5562468214b8a746ec70620f1b828 | |
parent | c44ee37cbd05af48523f7099803924dee757709c (diff) | |
download | ffmpeg-b6932f64343815e988e1f977f0bd099271cb6478.tar.gz |
avcodec/jpeg2000dwt: Check ndeclevels before calling dwt_encode*()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit feb3f39614b88c113211a98dda1bc2fe5c3c6957)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/jpeg2000dwt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c index 015a4fec27..925adea13b 100644 --- a/libavcodec/jpeg2000dwt.c +++ b/libavcodec/jpeg2000dwt.c @@ -540,6 +540,9 @@ int ff_jpeg2000_dwt_init(DWTContext *s, uint16_t border[2][2], int ff_dwt_encode(DWTContext *s, void *t) { + if (s->ndeclevels == 0) + return 0; + switch(s->type){ case FF_DWT97: dwt_encode97_float(s, t); break; |