diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-11-06 19:11:34 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-11-06 19:11:34 +0000 |
commit | 359fa0febc878066cbb31102e1ee709374054015 (patch) | |
tree | 6162497090306a8e6d99ebff0b19a15aae119d11 /libavcodec | |
parent | 70122f2902c815e395be44bc4097cbf6164ef3f5 (diff) | |
download | ffmpeg-359fa0febc878066cbb31102e1ee709374054015.tar.gz |
cbr audio muxing fix
Originally committed as revision 3661 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/pcm.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index 4c999b4302..13a16e7475 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -127,6 +127,23 @@ static int pcm_encode_init(AVCodecContext *avctx) break; } + switch(avctx->codec->id) { + case CODEC_ID_PCM_S16LE: + case CODEC_ID_PCM_S16BE: + case CODEC_ID_PCM_U16LE: + case CODEC_ID_PCM_U16BE: + avctx->block_align = 2 * avctx->channels; + break; + case CODEC_ID_PCM_S8: + case CODEC_ID_PCM_U8: + case CODEC_ID_PCM_MULAW: + case CODEC_ID_PCM_ALAW: + avctx->block_align = avctx->channels; + break; + default: + break; + } + avctx->coded_frame= avcodec_alloc_frame(); avctx->coded_frame->key_frame= 1; |