summaryrefslogtreecommitdiff
path: root/libavcodec/adpcmenc.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-01-31 15:57:53 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2012-02-20 15:52:32 -0500
commit770a5c6d025e9c8eb3f5aba9cf1d7d7938fb918a (patch)
tree8419878c8ab8e252551de4899da14bb184f7b4b8 /libavcodec/adpcmenc.c
parent91a28b0e8e4f09a8256727e8a514bf98da81e186 (diff)
adpcmenc: Use correct frame_size for Yamaha ADPCM.
Output packet size should match avctx->block_align. The target output packet size is 1024 bytes. Before: mono - 1024 samples -> 512 bytes stereo - 2048 samples -> 2048 bytes After: mono - 2048 samples -> 1024 bytes stereo - 1024 samples -> 1024 bytes
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 a24238ccb8..25a07c4464 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -122,7 +122,7 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
}
break;
case CODEC_ID_ADPCM_YAMAHA:
- avctx->frame_size = BLKSIZE * avctx->channels;
+ avctx->frame_size = BLKSIZE * 2 / avctx->channels;
avctx->block_align = BLKSIZE;
break;
case CODEC_ID_ADPCM_SWF: