Commit 675eedf4 authored by jbr's avatar jbr

do not set channels before checking request_channels

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11418 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b8547de8
...@@ -186,11 +186,12 @@ static int a52_decode_frame(AVCodecContext *avctx, ...@@ -186,11 +186,12 @@ static int a52_decode_frame(AVCodecContext *avctx,
s->channels = ac3_channels[s->flags & 7]; s->channels = ac3_channels[s->flags & 7];
if (s->flags & A52_LFE) if (s->flags & A52_LFE)
s->channels++; s->channels++;
avctx->channels = s->channels;
if (avctx->request_channels > 0 && if (avctx->request_channels > 0 &&
avctx->request_channels <= 2 && avctx->request_channels <= 2 &&
avctx->request_channels < s->channels) { avctx->request_channels < s->channels) {
avctx->channels = avctx->request_channels; avctx->channels = avctx->request_channels;
} else {
avctx->channels = s->channels;
} }
avctx->bit_rate = bit_rate; avctx->bit_rate = bit_rate;
} }
......
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