[FFmpeg-devel] [PATCH 2/2] wmavoice: reindent.

Ronald S. Bultje rsbultje at gmail.com
Tue Dec 20 23:50:19 EET 2016


---
 libavcodec/wmavoice.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index 5001b0b..5393003 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -1887,23 +1887,23 @@ static int wmavoice_decode_packet(AVCodecContext *ctx, void *data,
         /* If the packet header specifies a s->spillover_nbits, then we want
          * to push out all data of the previous packet (+ spillover) before
          * continuing to parse new superframes in the current packet. */
-            if (s->sframe_cache_size > 0) {
-                int cnt = get_bits_count(gb);
-                copy_bits(&s->pb, avpkt->data, size, gb, s->spillover_nbits);
-                flush_put_bits(&s->pb);
-                s->sframe_cache_size += s->spillover_nbits;
-                if ((res = synth_superframe(ctx, data, got_frame_ptr)) == 0 &&
-                    *got_frame_ptr) {
-                    cnt += s->spillover_nbits;
-                    s->skip_bits_next = cnt & 7;
-                    res = cnt >> 3;
-                    return FFMIN(avpkt->size, res);
-                } else
-                    skip_bits_long(gb, s->spillover_nbits - cnt +
-                                   get_bits_count(gb)); // resync
-            } else if (s->spillover_nbits) {
-                skip_bits_long(gb, s->spillover_nbits);  // resync
-            }
+        if (s->sframe_cache_size > 0) {
+            int cnt = get_bits_count(gb);
+            copy_bits(&s->pb, avpkt->data, size, gb, s->spillover_nbits);
+            flush_put_bits(&s->pb);
+            s->sframe_cache_size += s->spillover_nbits;
+            if ((res = synth_superframe(ctx, data, got_frame_ptr)) == 0 &&
+                *got_frame_ptr) {
+                cnt += s->spillover_nbits;
+                s->skip_bits_next = cnt & 7;
+                res = cnt >> 3;
+                return FFMIN(avpkt->size, res);
+            } else
+                skip_bits_long(gb, s->spillover_nbits - cnt +
+                               get_bits_count(gb)); // resync
+        } else if (s->spillover_nbits) {
+            skip_bits_long(gb, s->spillover_nbits);  // resync
+        }
     } else if (s->skip_bits_next)
         skip_bits(gb, s->skip_bits_next);
 
-- 
2.8.1



More information about the ffmpeg-devel mailing list