[FFmpeg-soc] [soc]: r5160 - als/alsdec.c

thilo.borgmann subversion at mplayerhq.hu
Mon Aug 17 13:00:11 CEST 2009


Author: thilo.borgmann
Date: Mon Aug 17 13:00:11 2009
New Revision: 5160

Log:
Add enum type for random access flag.

Modified:
   als/alsdec.c

Modified: als/alsdec.c
==============================================================================
--- als/alsdec.c	Mon Aug 17 12:45:27 2009	(r5159)
+++ als/alsdec.c	Mon Aug 17 13:00:11 2009	(r5160)
@@ -36,6 +36,13 @@
 
 #include "als_data.h"
 
+enum RA_Flag {
+    RA_FLAG_NONE,
+    RA_FLAG_FRAMES,
+    RA_FLAG_HEADER
+};
+
+
 typedef struct {
     uint32_t als_id;                 ///< ALS identifier
     uint32_t samp_freq;              ///< Sampling frequency in Hz
@@ -47,7 +54,7 @@ typedef struct {
     int      msb_first;              ///< Original byte order of the input audio data
     int      frame_length;           ///< Frame Length
     int      random_access;          ///< Distance between RA frames (in frames, 0...255)
-    int      ra_flag;                ///< Indicates where the size of ra units is stored.
+    enum RA_Flag ra_flag;                ///< Indicates where the size of ra units is stored.
     int      adapt_order;            ///< Adaptive order: 1 = on, 0 = off
     int      coef_table;             ///< Table index of Rice code parameters
     int      long_term_prediction;   ///< Long term prediction (LTP): 1 = on, 0 = off
@@ -738,7 +745,7 @@ static int read_frame_data(ALSDecContext
     unsigned int *ptr_div_blocks;
 
     // skip ra_unit_size if present
-    if (sconf->ra_flag == 1 && ra_frame)
+    if (sconf->ra_flag == RA_FLAG_FRAMES && ra_frame)
         skip_bits_long(gb, 32);
 
     if (sconf->mc_coding && sconf->joint_stereo) {


More information about the FFmpeg-soc mailing list