Commit 60956a9d authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/wavpackenc: Headers are per channel

Fixes: 1b8b83a53bfa751f01b1daa65a4758db/signal_sigabrt_7ffff6ae7cb7_7488_403f71d1a2565b598d01b6cb110fac8f.aiff
Fixes: assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 26757b02)

Conflicts:

	libavcodec/wavpackenc.c
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 526b5fac
...@@ -2882,7 +2882,7 @@ static int wavpack_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, ...@@ -2882,7 +2882,7 @@ static int wavpack_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
} }
buf_size = s->block_samples * avctx->channels * 8 buf_size = s->block_samples * avctx->channels * 8
+ 200 /* for headers */; + 200 * avctx->channels /* for headers */;
if ((ret = ff_alloc_packet2(avctx, avpkt, buf_size)) < 0) if ((ret = ff_alloc_packet2(avctx, avpkt, buf_size)) < 0)
return ret; return ret;
buf = avpkt->data; buf = avpkt->data;
......
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