[FFmpeg-cvslog] avcodec/jpeg2000dwt: Check ndeclevels before calling dwt_encode*()
Michael Niedermayer
git at videolan.org
Fri Nov 27 21:16:39 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Nov 27 21:02:13 2015 +0100| [feb3f39614b88c113211a98dda1bc2fe5c3c6957] | committer: Michael Niedermayer
avcodec/jpeg2000dwt: Check ndeclevels before calling dwt_encode*()
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=feb3f39614b88c113211a98dda1bc2fe5c3c6957
---
libavcodec/jpeg2000dwt.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c
index 36e443d..a46c93a 100644
--- a/libavcodec/jpeg2000dwt.c
+++ b/libavcodec/jpeg2000dwt.c
@@ -580,6 +580,9 @@ int ff_jpeg2000_dwt_init(DWTContext *s, int 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;
More information about the ffmpeg-cvslog
mailing list