Commit 3d2f1002 authored by michael's avatar michael

>2 channels decoding fix


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3086 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7500ff71
......@@ -877,9 +877,12 @@ static int ac3_parse(AVCodecParserContext *s1,
s->frame_size = len;
/* update codec info */
avctx->sample_rate = sample_rate;
avctx->channels = ac3_channels[s->flags & 7];
if (s->flags & A52_LFE)
avctx->channels++;
/* set channels,except if the user explicitly requests 1 or 2 channels, XXX/FIXME this is a bit ugly */
if(avctx->channels!=1 && avctx->channels!=2){
avctx->channels = ac3_channels[s->flags & 7];
if (s->flags & A52_LFE)
avctx->channels++;
}
avctx->bit_rate = bit_rate;
avctx->frame_size = 6 * 256;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment