mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-19 19:03:00 +02:00
do not set channels before checking request_channels
Originally committed as revision 11418 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
1 parent
dc7009ea1b
commit
3eca1e6fad
1 file changed
+2
-1
+2
-1
@@ -186,11 +186,12 @@ static int a52_decode_frame(AVCodecContext *avctx,
|
||||
s->channels = ac3_channels[s->flags & 7];
|
||||
if (s->flags & A52_LFE)
|
||||
s->channels++;
|
||||
avctx->channels = s->channels;
|
||||
if (avctx->request_channels > 0 &&
|
||||
avctx->request_channels <= 2 &&
|
||||
avctx->request_channels < s->channels) {
|
||||
avctx->channels = avctx->request_channels;
|
||||
} else {
|
||||
avctx->channels = s->channels;
|
||||
}
|
||||
avctx->bit_rate = bit_rate;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user