[FFmpeg-soc] [soc]: r5341 - wmapro/wmaprodec.c

faust3 subversion at mplayerhq.hu
Sat Aug 29 17:54:55 CEST 2009


Author: faust3
Date: Sat Aug 29 17:54:55 2009
New Revision: 5341

Log:
reindent

Modified:
   wmapro/wmaprodec.c

Modified: wmapro/wmaprodec.c
==============================================================================
--- wmapro/wmaprodec.c	Sat Aug 29 17:49:09 2009	(r5340)
+++ wmapro/wmaprodec.c	Sat Aug 29 17:54:55 2009	(r5341)
@@ -524,54 +524,54 @@ static int decode_tilehdr(WMA3DecodeCont
     if (s->max_num_subframes == 1 || get_bits1(&s->gb))
         fixed_channel_layout = 1;
 
-        /** loop until the frame data is split between the subframes */
-        do {
-            int subframe_len;
+    /** loop until the frame data is split between the subframes */
+    do {
+        int subframe_len;
 
-            /** check which channels contain the subframe */
-            for (c = 0; c < s->num_channels; c++) {
-                if (num_samples[c] == min_channel_len) {
-                    if (fixed_channel_layout || channels_for_cur_subframe == 1 ||
-                       (min_channel_len == s->samples_per_frame - s->min_samples_per_subframe))
-                        contains_subframe[c] = 1;
-                    else
-                        contains_subframe[c] = get_bits1(&s->gb);
-                } else
-                    contains_subframe[c] = 0;
-            }
+        /** check which channels contain the subframe */
+        for (c = 0; c < s->num_channels; c++) {
+            if (num_samples[c] == min_channel_len) {
+                if (fixed_channel_layout || channels_for_cur_subframe == 1 ||
+                   (min_channel_len == s->samples_per_frame - s->min_samples_per_subframe))
+                    contains_subframe[c] = 1;
+                else
+                    contains_subframe[c] = get_bits1(&s->gb);
+            } else
+                contains_subframe[c] = 0;
+        }
 
-            /** get subframe length */
-            if (!(subframe_len = decode_subframe_length(s, min_channel_len)))
-                return AVERROR_INVALIDDATA;
+        /** get subframe length */
+        if (!(subframe_len = decode_subframe_length(s, min_channel_len)))
+            return AVERROR_INVALIDDATA;
 
-            /** add subframes to the individual channels and find new min_channel_len */
-            min_channel_len += subframe_len;
-            for (c = 0; c < s->num_channels; c++) {
-                WMA3ChannelCtx* chan = &s->channel[c];
+        /** add subframes to the individual channels and find new min_channel_len */
+        min_channel_len += subframe_len;
+        for (c = 0; c < s->num_channels; c++) {
+            WMA3ChannelCtx* chan = &s->channel[c];
 
-                if (contains_subframe[c]) {
-                    if (chan->num_subframes >= MAX_SUBFRAMES) {
-                        av_log(s->avctx, AV_LOG_ERROR,
-                               "broken frame: num subframes > 31\n");
-                        return AVERROR_INVALIDDATA;
-                    }
-                    chan->subframe_len[chan->num_subframes] = subframe_len;
-                    num_samples[c] += subframe_len;
-                    ++chan->num_subframes;
-                    if (num_samples[c] > s->samples_per_frame) {
-                        av_log(s->avctx, AV_LOG_ERROR,"broken frame: "
-                               "channel len > samples_per_frame\n");
-                        return AVERROR_INVALIDDATA;
-                    }
-                } else if(num_samples[c] <= min_channel_len) {
-                    if (num_samples[c] < min_channel_len) {
-                        channels_for_cur_subframe = 0;
-                        min_channel_len = num_samples[c];
-                    }
-                    ++channels_for_cur_subframe;
+            if (contains_subframe[c]) {
+                if (chan->num_subframes >= MAX_SUBFRAMES) {
+                    av_log(s->avctx, AV_LOG_ERROR,
+                           "broken frame: num subframes > 31\n");
+                    return AVERROR_INVALIDDATA;
                 }
+                chan->subframe_len[chan->num_subframes] = subframe_len;
+                num_samples[c] += subframe_len;
+                ++chan->num_subframes;
+                if (num_samples[c] > s->samples_per_frame) {
+                    av_log(s->avctx, AV_LOG_ERROR,"broken frame: "
+                           "channel len > samples_per_frame\n");
+                    return AVERROR_INVALIDDATA;
+                }
+            } else if(num_samples[c] <= min_channel_len) {
+                if (num_samples[c] < min_channel_len) {
+                    channels_for_cur_subframe = 0;
+                    min_channel_len = num_samples[c];
+                }
+                ++channels_for_cur_subframe;
             }
-        } while (min_channel_len < s->samples_per_frame);
+        }
+    } while (min_channel_len < s->samples_per_frame);
 
     for (c = 0; c < s->num_channels; c++) {
         int i;


More information about the FFmpeg-soc mailing list