---
And K&R for this file on Monday!
Vittorio

 libavcodec/aac_ac3_parser.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c
index b17cd4d..9fd205f 100644
--- a/libavcodec/aac_ac3_parser.c
+++ b/libavcodec/aac_ac3_parser.c
@@ -83,13 +83,13 @@ get_next:
         avctx->sample_rate = s->sample_rate;
 
         /* allow downmixing to stereo (or mono for AC-3) */
-        if(avctx->request_channels > 0 &&
-                avctx->request_channels < s->channels &&
-                (avctx->request_channels <= 2 ||
-                (avctx->request_channels == 1 &&
+        if(avctx->request_channel_layout > 0 &&
+            avctx->request_channel_layout < s->channels &&
+                (avctx->request_channel_layout <= 2 ||
+                (avctx->request_channel_layout == 1 &&
                 (avctx->codec_id == AV_CODEC_ID_AC3 ||
                  avctx->codec_id == AV_CODEC_ID_EAC3)))) {
-            avctx->channels = avctx->request_channels;
+            avctx->channels = avctx->request_channel_layout;
         } else {
             avctx->channels = s->channels;
             avctx->channel_layout = s->channel_layout;
-- 
1.8.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to