]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/adpcm_ima_ssi: support custom block size for encoding
authorZane van Iperen <zane@zanevaniperen.com>
Wed, 14 Oct 2020 12:41:43 +0000 (22:41 +1000)
committerZane van Iperen <zane@zanevaniperen.com>
Fri, 16 Oct 2020 23:36:05 +0000 (09:36 +1000)
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
libavcodec/adpcmenc.c

index df5a7333cbc8b27fd8dbde9454d4ada9ccb1d8a2..3d036e1f92a1552aea145ec8f1d120bf5fa6345c 100644 (file)
@@ -156,8 +156,8 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
         avctx->frame_size = 512 * (avctx->sample_rate / 11025);
         break;
     case AV_CODEC_ID_ADPCM_IMA_SSI:
-        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_IMA_APM:
         avctx->frame_size = BLKSIZE * 2 / avctx->channels;