Commit b15d3db8 authored by Paul B Mahol's avatar Paul B Mahol

avcodec/wavpack: do not process only first non-zero field of int32info chunk

Fixes bitexact decoding with high bit depth samples.
parent df98e8e4
...@@ -1303,14 +1303,16 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, ...@@ -1303,14 +1303,16 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
av_log(avctx, AV_LOG_ERROR, av_log(avctx, AV_LOG_ERROR,
"Invalid INT32INFO, extra_bits = %d (> 30)\n", val[0]); "Invalid INT32INFO, extra_bits = %d (> 30)\n", val[0]);
continue; continue;
} else if (val[0]) { } else {
s->extra_bits = val[0]; s->extra_bits = val[0];
} else if (val[1]) { }
if (val[1])
s->shift = val[1]; s->shift = val[1];
} else if (val[2]) { if (val[2]) {
s->and = s->or = 1; s->and = s->or = 1;
s->shift = val[2]; s->shift = val[2];
} else if (val[3]) { }
if (val[3]) {
s->and = 1; s->and = 1;
s->shift = val[3]; s->shift = val[3];
} }
......
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