diff options
author | Mans Rullgard <mans@mansr.com> | 2012-05-16 00:01:34 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-12 20:36:47 +0200 |
commit | 394f4ee61e3bf94aae0749095c8a555e3cb3b719 (patch) | |
tree | 2a67bbd7b1a54c5ad23ae86b16c838ea2f5a3df4 /libavcodec | |
parent | 497d66126242a94c32c146434e543ee2833e6349 (diff) | |
download | ffmpeg-394f4ee61e3bf94aae0749095c8a555e3cb3b719.tar.gz |
pcmenc: set correct bitrate value
This fixes a bogus bitrate value in the header of WAV files with
alaw/ulaw audio.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 7d7b40f48a05af4483b31cdb8b4f1808b97b1f2f)
Conflicts:
libavcodec/pcm.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/pcm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index 35ccc9d8f4..818a635d22 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -48,6 +48,7 @@ static av_cold int pcm_encode_init(AVCodecContext *avctx) avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id); avctx->block_align = avctx->channels * avctx->bits_per_coded_sample/8; + avctx->bit_rate = avctx->block_align * avctx->sample_rate * 8; avctx->coded_frame= avcodec_alloc_frame(); avctx->coded_frame->key_frame= 1; |