[FFmpeg-cvslog] avcodec/jpeg2000dwt: Check ndeclevels before calling dwt_encode*()
Michael Niedermayer
git at videolan.org
Sun Dec 6 02:26:06 CET 2015
ffmpeg | branch: release/2.5 | Michael Niedermayer <michael at niedermayer.cc> | Fri Nov 27 21:02:13 2015 +0100| [6bc2f5cc0b23227e5a77636d77772eb132c222e7] | committer: Michael Niedermayer
avcodec/jpeg2000dwt: Check ndeclevels before calling dwt_encode*()
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit feb3f39614b88c113211a98dda1bc2fe5c3c6957)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6bc2f5cc0b23227e5a77636d77772eb132c222e7
---
libavcodec/jpeg2000dwt.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c
index 015a4fe..925adea 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;
More information about the ffmpeg-cvslog
mailing list