summaryrefslogtreecommitdiff
path: root/libavcodec/adpcmenc.c
diff options
context:
space:
mode:
authorZane van Iperen <zane@zanevaniperen.com>2020-11-06 22:03:37 +1000
committerZane van Iperen <zane@zanevaniperen.com>2020-11-07 23:43:26 +1000
commit406879f49c414763bbb1b2e75ca1826d179ee2c1 (patch)
treec6a5f92257dd22418dbc0a30ba3107a419878f89 /libavcodec/adpcmenc.c
parent45d45c8ec571aa1807ab770c384992856f070dd6 (diff)
downloadffmpeg-406879f49c414763bbb1b2e75ca1826d179ee2c1.tar.gz
avcodec/adpcm_ima_swf: fix frame size to 4096
SWF File Format Specification, Version 19 says this is 1 raw sample + 4095 nibbles. https://www.adobe.com/content/dam/acom/en/devnet/pdf/swf-file-format-spec.pdf Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Diffstat (limited to 'libavcodec/adpcmenc.c')
-rw-r--r--libavcodec/adpcmenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index ee13faa4cb..5670da1dea 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -153,7 +153,7 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
"22050 or 44100\n");
return AVERROR(EINVAL);
}
- avctx->frame_size = (s->block_size / 2) * (avctx->sample_rate / 11025);
+ avctx->frame_size = 4096; /* Hardcoded according to the SWF spec. */
avctx->block_align = (2 + avctx->channels * (22 + 4 * (avctx->frame_size - 1)) + 7) / 8;
break;
case AV_CODEC_ID_ADPCM_IMA_SSI: