aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-08-03 11:42:33 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-08-03 11:45:33 +0200
commiteb29649cad7c133e68f0194b9b913f039a7c623f (patch)
tree634f4e3f5170cf34a7af71f77f6b04f0b22867d2 /libavcodec
parentf1b7c7e697e04b5fbbc39bd282956a16d408437d (diff)
downloadffmpeg-eb29649cad7c133e68f0194b9b913f039a7c623f.tar.gz
Set bits_per_coded_sample when encoding ADPCM.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/adpcm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index ba312558b0..4e1299379f 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -198,6 +198,7 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
avctx->frame_size = (BLKSIZE - 4 * avctx->channels) * 8 / (4 * avctx->channels) + 1; /* each 16 bits sample gives one nibble */
/* and we have 4 bytes per channel overhead */
avctx->block_align = BLKSIZE;
+ avctx->bits_per_coded_sample = 4;
/* seems frame_size isn't taken into account... have to buffer the samples :-( */
break;
case CODEC_ID_ADPCM_IMA_QT:
@@ -208,6 +209,7 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
avctx->frame_size = (BLKSIZE - 7 * avctx->channels) * 2 / avctx->channels + 2; /* each 16 bits sample gives one nibble */
/* and we have 7 bytes per channel overhead */
avctx->block_align = BLKSIZE;
+ avctx->bits_per_coded_sample = 4;
avctx->extradata_size = 32;
extradata = avctx->extradata = av_malloc(avctx->extradata_size);
if (!extradata)