[FFmpeg-soc] [soc]: r2232 - eac3/ac3dec.c

jbr subversion at mplayerhq.hu
Tue May 27 06:30:30 CEST 2008


Author: jbr
Date: Tue May 27 06:30:29 2008
New Revision: 2232

Log:
move setting of output channel mode to ac3_decode_frame()

Modified:
   eac3/ac3dec.c

Modified: eac3/ac3dec.c
==============================================================================
--- eac3/ac3dec.c	(original)
+++ eac3/ac3dec.c	Tue May 27 06:30:29 2008
@@ -309,11 +309,7 @@ static int parse_frame_header(AC3DecodeC
     s->bitstream_id                 = hdr.bitstream_id;
     s->num_blocks                   = hdr.num_blocks;
 
-    /* set default output to all source channels */
-    s->out_channels = s->channels;
-    s->output_mode = s->channel_mode;
     if(s->lfe_on) {
-        s->output_mode |= AC3_OUTPUT_LFEON;
         s->start_freq[s->lfe_ch] = 0;
         s->end_freq[s->lfe_ch] = 7;
         s->num_exp_groups[s->lfe_ch] = 2;
@@ -1296,6 +1292,9 @@ static int ac3_decode_frame(AVCodecConte
 
     /* channel config */
     s->out_channels = s->channels;
+    s->output_mode = s->channel_mode;
+    if(s->lfe_on)
+        s->output_mode |= AC3_OUTPUT_LFEON;
     if (avctx->request_channels > 0 && avctx->request_channels <= 2 &&
         avctx->request_channels < s->channels) {
         s->out_channels = avctx->request_channels;



More information about the FFmpeg-soc mailing list