Mercurial > libavcodec.hg
diff pcm.c @ 2340:a2073e67cb19 libavcodec
cbr audio muxing fix
author | michael |
---|---|
date | Sat, 06 Nov 2004 19:11:34 +0000 |
parents | 934117474c3b |
children | 9404bbf9de07 |
line wrap: on
line diff
--- a/pcm.c Sun Oct 31 12:22:00 2004 +0000 +++ b/pcm.c Sat Nov 06 19:11:34 2004 +0000 @@ -127,6 +127,23 @@ 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;