[FFmpeg-devel] [PATCH 5/7] avcodec/adpcm_yamaha: support variable block size for encoding

Zane van Iperen zane at zanevaniperen.com
Wed Oct 14 16:10:23 EEST 2020


Signed-off-by: Zane van Iperen <zane at zanevaniperen.com>
---
 libavcodec/adpcmenc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index d234d3dbf2..800a9b0b00 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -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 &&
-- 
2.25.4




More information about the ffmpeg-devel mailing list