changeset 6352:a14abb3d08aa libavcodec

Cosmetics: indentation Patch by Thorsten Jordan (tjordan atay macrosystem otday de) [FFmpeg-devel] Behaviour of liba52 decoder
author superdump
date Wed, 13 Feb 2008 14:24:34 +0000
parents b568fe642948
children 42a3c36e3303
files liba52.c
diffstat 1 files changed, 36 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/liba52.c	Wed Feb 13 14:20:22 2008 +0000
+++ b/liba52.c	Wed Feb 13 14:24:34 2008 +0000
@@ -160,46 +160,46 @@
         return -1;
     }
     len = s->a52_syncinfo(buf, &s->flags, &sample_rate, &bit_rate);
-                if (len == 0) {
-                    av_log(avctx, AV_LOG_ERROR, "Error decoding frame, no sync byte at begin\n");
-                    return -1;
-                }
+    if (len == 0) {
+        av_log(avctx, AV_LOG_ERROR, "Error decoding frame, no sync byte at begin\n");
+        return -1;
+    }
     if (buf_size < len) {
         av_log(avctx, AV_LOG_ERROR, "Error decoding frame, not enough bytes\n");
         return -1;
     }
-                    /* update codec info */
-                    avctx->sample_rate = sample_rate;
-                    s->channels = ac3_channels[s->flags & 7];
-                    if (s->flags & A52_LFE)
-                        s->channels++;
-                    if (avctx->request_channels > 0 &&
-                            avctx->request_channels <= 2 &&
-                            avctx->request_channels < s->channels) {
-                        avctx->channels = avctx->request_channels;
-                    } else {
-                        avctx->channels = s->channels;
-                    }
-                    avctx->bit_rate = bit_rate;
-            flags = s->flags;
-            if (avctx->channels == 1)
-                flags = A52_MONO;
-            else if (avctx->channels == 2)
-                flags = A52_STEREO;
-            else
-                flags |= A52_ADJUST_LEVEL;
-            level = 1;
-            if (s->a52_frame(s->state, buf, &flags, &level, 384)) {
-            fail:
-                av_log(avctx, AV_LOG_ERROR, "Error decoding frame\n");
-                return -1;
-            }
-            for (i = 0; i < 6; i++) {
-                if (s->a52_block(s->state))
-                    goto fail;
-                float_to_int(s->samples, out_samples + i * 256 * avctx->channels, avctx->channels);
-            }
-            *data_size = 6 * avctx->channels * 256 * sizeof(int16_t);
+    /* update codec info */
+    avctx->sample_rate = sample_rate;
+    s->channels = ac3_channels[s->flags & 7];
+    if (s->flags & A52_LFE)
+            s->channels++;
+    if (avctx->request_channels > 0 &&
+        avctx->request_channels <= 2 &&
+        avctx->request_channels < s->channels) {
+        avctx->channels = avctx->request_channels;
+    } else {
+        avctx->channels = s->channels;
+    }
+    avctx->bit_rate = bit_rate;
+    flags = s->flags;
+    if (avctx->channels == 1)
+        flags = A52_MONO;
+    else if (avctx->channels == 2)
+        flags = A52_STEREO;
+    else
+        flags |= A52_ADJUST_LEVEL;
+    level = 1;
+    if (s->a52_frame(s->state, buf, &flags, &level, 384)) {
+    fail:
+        av_log(avctx, AV_LOG_ERROR, "Error decoding frame\n");
+        return -1;
+    }
+    for (i = 0; i < 6; i++) {
+        if (s->a52_block(s->state))
+            goto fail;
+        float_to_int(s->samples, out_samples + i * 256 * avctx->channels, avctx->channels);
+    }
+    *data_size = 6 * avctx->channels * 256 * sizeof(int16_t);
     return len;
 }