[FFmpeg-soc] [soc]: r1737 - in eac3: ac3dec.c ac3dec.h

jbr subversion at mplayerhq.hu
Tue Jan 1 00:29:35 CET 2008


Author: jbr
Date: Tue Jan  1 00:29:35 2008
New Revision: 1737

Log:
add field to AC3DecodeContext to indicate E-AC3

Modified:
   eac3/ac3dec.c
   eac3/ac3dec.h

Modified: eac3/ac3dec.c
==============================================================================
--- eac3/ac3dec.c	(original)
+++ eac3/ac3dec.c	Tue Jan  1 00:29:35 2008
@@ -330,8 +330,10 @@ int ff_ac3_parse_frame_header(AC3DecodeC
     s->surround_mix_level = 6;  // -6.0dB
 
     if(s->bitstream_id <= 10) {
+        s->eac3 = 0;
         return ac3_parse_header(s);
     } else {
+        s->eac3 = 1;
         return ff_eac3_parse_header(s);
     }
 }
@@ -970,7 +972,7 @@ static int ac3_parse_audio_block(AC3Deco
 
 static int parse_audio_block(AC3DecodeContext *s, int blk)
 {
-    if(s->bitstream_id <= 10)
+    if(!s->eac3)
         return ac3_parse_audio_block(s, blk);
     else
         return ff_eac3_parse_audio_block(s, blk);

Modified: eac3/ac3dec.h
==============================================================================
--- eac3/ac3dec.h	(original)
+++ eac3/ac3dec.h	Tue Jan  1 00:29:35 2008
@@ -85,6 +85,7 @@ typedef struct AC3DecodeContext {
     int bitstream_id;   ///< Bit stream identification (bsid)
     int center_mix_level;   ///< Center mix level index
     int surround_mix_level; ///< Surround mix level index
+    int eac3;               ///< indicates if current frame is E-AC3
 ///@}
 
 ///@defgroup audfrm Frame Syntax Parameters



More information about the FFmpeg-soc mailing list