[FFmpeg-cvslog] avcodec/mlp_parser: reindent after last commit

James Almer git at videolan.org
Tue Jan 30 04:12:49 EET 2018


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Fri Jan 19 15:53:32 2018 -0300| [ede6e7494f61927d20216cdbc6f85cfba2341654] | committer: James Almer

avcodec/mlp_parser: reindent after last commit

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ede6e7494f61927d20216cdbc6f85cfba2341654
---

 libavcodec/mlp_parser.c | 92 ++++++++++++++++++++++++-------------------------
 1 file changed, 46 insertions(+), 46 deletions(-)

diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index 4827354f18..185bd4d667 100644
--- a/libavcodec/mlp_parser.c
+++ b/libavcodec/mlp_parser.c
@@ -259,65 +259,65 @@ static int mlp_parse(AVCodecParserContext *s,
     if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) {
         next = buf_size;
     } else {
-    if (!mp->in_sync) {
-        // Not in sync - find a major sync header
-
-        for (i = 0; i < buf_size; i++) {
-            mp->pc.state = (mp->pc.state << 8) | buf[i];
-            if ((mp->pc.state & 0xfffffffe) == 0xf8726fba &&
-                // ignore if we do not have the data for the start of header
-                mp->pc.index + i >= 7) {
-                mp->in_sync = 1;
-                mp->bytes_left = 0;
-                break;
+        if (!mp->in_sync) {
+            // Not in sync - find a major sync header
+
+            for (i = 0; i < buf_size; i++) {
+                mp->pc.state = (mp->pc.state << 8) | buf[i];
+                if ((mp->pc.state & 0xfffffffe) == 0xf8726fba &&
+                    // ignore if we do not have the data for the start of header
+                    mp->pc.index + i >= 7) {
+                    mp->in_sync = 1;
+                    mp->bytes_left = 0;
+                    break;
+                }
             }
-        }
 
-        if (!mp->in_sync) {
-            if (ff_combine_frame(&mp->pc, END_NOT_FOUND, &buf, &buf_size) != -1)
+            if (!mp->in_sync) {
+                if (ff_combine_frame(&mp->pc, END_NOT_FOUND, &buf, &buf_size) != -1)
+                    av_log(avctx, AV_LOG_WARNING, "ff_combine_frame failed\n");
+                return buf_size;
+            }
+
+            if ((ret = ff_combine_frame(&mp->pc, i - 7, &buf, &buf_size)) < 0) {
                 av_log(avctx, AV_LOG_WARNING, "ff_combine_frame failed\n");
-            return buf_size;
-        }
+                return ret;
+            }
 
-        if ((ret = ff_combine_frame(&mp->pc, i - 7, &buf, &buf_size)) < 0) {
-            av_log(avctx, AV_LOG_WARNING, "ff_combine_frame failed\n");
-            return ret;
+            return i - 7;
         }
 
-        return i - 7;
-    }
+        if (mp->bytes_left == 0) {
+            // Find length of this packet
 
-    if (mp->bytes_left == 0) {
-        // Find length of this packet
-
-        /* Copy overread bytes from last frame into buffer. */
-        for(; mp->pc.overread>0; mp->pc.overread--) {
-            mp->pc.buffer[mp->pc.index++]= mp->pc.buffer[mp->pc.overread_index++];
-        }
+            /* Copy overread bytes from last frame into buffer. */
+            for(; mp->pc.overread>0; mp->pc.overread--) {
+                mp->pc.buffer[mp->pc.index++]= mp->pc.buffer[mp->pc.overread_index++];
+            }
 
-        if (mp->pc.index + buf_size < 2) {
-            if (ff_combine_frame(&mp->pc, END_NOT_FOUND, &buf, &buf_size) != -1)
-                av_log(avctx, AV_LOG_WARNING, "ff_combine_frame failed\n");
-            return buf_size;
-        }
+            if (mp->pc.index + buf_size < 2) {
+                if (ff_combine_frame(&mp->pc, END_NOT_FOUND, &buf, &buf_size) != -1)
+                    av_log(avctx, AV_LOG_WARNING, "ff_combine_frame failed\n");
+                return buf_size;
+            }
 
-        mp->bytes_left = ((mp->pc.index > 0 ? mp->pc.buffer[0] : buf[0]) << 8)
-                       |  (mp->pc.index > 1 ? mp->pc.buffer[1] : buf[1-mp->pc.index]);
-        mp->bytes_left = (mp->bytes_left & 0xfff) * 2;
-        if (mp->bytes_left <= 0) { // prevent infinite loop
-            goto lost_sync;
+            mp->bytes_left = ((mp->pc.index > 0 ? mp->pc.buffer[0] : buf[0]) << 8)
+                           |  (mp->pc.index > 1 ? mp->pc.buffer[1] : buf[1-mp->pc.index]);
+            mp->bytes_left = (mp->bytes_left & 0xfff) * 2;
+            if (mp->bytes_left <= 0) { // prevent infinite loop
+                goto lost_sync;
+            }
+            mp->bytes_left -= mp->pc.index;
         }
-        mp->bytes_left -= mp->pc.index;
-    }
 
-    next = (mp->bytes_left > buf_size) ? END_NOT_FOUND : mp->bytes_left;
+        next = (mp->bytes_left > buf_size) ? END_NOT_FOUND : mp->bytes_left;
 
-    if (ff_combine_frame(&mp->pc, next, &buf, &buf_size) < 0) {
-        mp->bytes_left -= buf_size;
-        return buf_size;
-    }
+        if (ff_combine_frame(&mp->pc, next, &buf, &buf_size) < 0) {
+            mp->bytes_left -= buf_size;
+            return buf_size;
+        }
 
-    mp->bytes_left = 0;
+        mp->bytes_left = 0;
     }
 
     sync_present = (AV_RB32(buf + 4) & 0xfffffffe) == 0xf8726fba;



More information about the ffmpeg-cvslog mailing list