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

index f21edfc3e35c686eda0dfb8ba5afb07249623870..6c07142a65aa191d1777ea0cac4cfec7ec8966e7 100644 (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 &&