Allows it to be muxed to WAVs. Signed-off-by: Zane van Iperen <z...@zanevaniperen.com> --- libavcodec/adpcmenc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index b2be83b84e..5b485e7d26 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -154,6 +154,7 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx) return AVERROR(EINVAL); } avctx->frame_size = 512 * (avctx->sample_rate / 11025); + avctx->block_align = (2 + avctx->channels * (22 + 4 * (avctx->frame_size - 1)) + 7) / 8; break; case AV_CODEC_ID_ADPCM_IMA_SSI: avctx->frame_size = s->block_size * 2 / avctx->channels; @@ -550,9 +551,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, samples_p = (int16_t **)frame->extended_data; st = avctx->channels == 2; - if (avctx->codec_id == AV_CODEC_ID_ADPCM_SWF) - pkt_size = (2 + avctx->channels * (22 + 4 * (frame->nb_samples - 1)) + 7) / 8; - else if (avctx->codec_id == AV_CODEC_ID_ADPCM_IMA_SSI || + if (avctx->codec_id == AV_CODEC_ID_ADPCM_IMA_SSI || avctx->codec_id == AV_CODEC_ID_ADPCM_IMA_APM) pkt_size = (frame->nb_samples * avctx->channels) / 2; else -- 2.28.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".