Fixes: 1b8b83a53bfa751f01b1daa65a4758db/signal_sigabrt_7ffff6ae7cb7_7488_403f71d1a2565b598d01b6cb110fac8f.aiff
Fixes: assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 26757b0279b4b93c6066c2151d4d3dbd2ec266bf)
Conflicts:
libavcodec/wavpackenc.c
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
... | ... |
@@ -2882,7 +2882,7 @@ static int wavpack_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, |
2882 | 2882 |
} |
2883 | 2883 |
|
2884 | 2884 |
buf_size = s->block_samples * avctx->channels * 8 |
2885 |
- + 200 /* for headers */; |
|
2885 |
+ + 200 * avctx->channels /* for headers */; |
|
2886 | 2886 |
if ((ret = ff_alloc_packet2(avctx, avpkt, buf_size)) < 0) |
2887 | 2887 |
return ret; |
2888 | 2888 |
buf = avpkt->data; |