summaryrefslogtreecommitdiff
path: root/libavcodec/adpcmenc.c
diff options
context:
space:
mode:
authorZane van Iperen <zane@zanevaniperen.com>2020-10-14 22:42:11 +1000
committerZane van Iperen <zane@zanevaniperen.com>2020-10-17 09:36:06 +1000
commiteb75a80dc8cb2578941608d9738cff6fafc4b4fa (patch)
tree851acf38248c07fd593f15a365742b3510674cb8 /libavcodec/adpcmenc.c
parentb5c2c9a1ce4a4caf525f1a1836d9a572476eda8b (diff)
avcodec/adpcm_ima_apm: support custom block size for encoding
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Diffstat (limited to 'libavcodec/adpcmenc.c')
-rw-r--r--libavcodec/adpcmenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index 3d036e1f92..f21edfc3e3 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -160,8 +160,8 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
avctx->block_align = s->block_size;
break;
case AV_CODEC_ID_ADPCM_IMA_APM:
- 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;
if (!(avctx->extradata = av_mallocz(28 + AV_INPUT_BUFFER_PADDING_SIZE)))
return AVERROR(ENOMEM);