avcodec/adpcm_yamaha: support custom block size for encoding

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
This commit is contained in:
Zane van Iperen 2020-10-14 22:43:03 +10:00
parent eb75a80dc8
commit ed1cfb8e31
No known key found for this signature in database
GPG Key ID: 68616B2D8AC4DCC5
1 changed files with 2 additions and 2 deletions

View File

@ -142,8 +142,8 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
}
break;
case AV_CODEC_ID_ADPCM_YAMAHA:
avctx->frame_size = BLKSIZE * 2 / avctx->channels;
avctx->block_align = BLKSIZE;
avctx->frame_size = s->block_size * 2 / avctx->channels;
avctx->block_align = s->block_size;
break;
case AV_CODEC_ID_ADPCM_SWF:
if (avctx->sample_rate != 11025 &&