Commit feb3f396 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/jpeg2000dwt: Check ndeclevels before calling dwt_encode*()

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 75422280
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment