diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c index a2d29aa2682e3..e5914fe87b035 100644 --- a/libavcodec/j2kenc.c +++ b/libavcodec/j2kenc.c @@ -658,11 +658,10 @@ static void encode_cblk(Jpeg2000EncoderContext *s, Jpeg2000T1Context *t1, Jpeg20 if (max == 0){ cblk->nonzerobits = 0; - bpno = 0; } else{ cblk->nonzerobits = av_log2(max) + 1 - NMSEDEC_FRACBITS; - bpno = cblk->nonzerobits - 1; } + bpno = cblk->nonzerobits - 1; cblk->data[0] = 0; ff_mqc_initenc(&t1->mqc, cblk->data + 1);