]> git.sesse.net Git - ffmpeg/commitdiff
lavc/avs2_parser.c: optimize code style
authorhwren <hwrenx@126.com>
Thu, 20 Aug 2020 06:58:52 +0000 (14:58 +0800)
committerhwren <hwrenx@126.com>
Mon, 5 Oct 2020 16:01:34 +0000 (00:01 +0800)
Signed-off-by: hwren <hwrenx@126.com>
libavcodec/avs2_parser.c

index 02af08f07963d07574533a5842ef3c1b449ff84d..54f687142f93c45d4a707762cfd63e8f4fd38b14 100644 (file)
@@ -34,9 +34,9 @@ static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_siz
 
     if (!pic_found) {
         for (; cur < buf_size; ++cur) {
-            state = (state<<8) | buf[cur];
+            state = (state << 8) | buf[cur];
             if (AVS2_ISUNIT(buf[cur])){
-                ++cur;
+                cur++;
                 pic_found = 1;
                 break;
             }
@@ -46,7 +46,7 @@ static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_siz
     if (pic_found) {
         if (!buf_size)
             return END_NOT_FOUND;
-        for (; cur < buf_size; ++cur) {
+        for (; cur < buf_size; cur++) {
             state = (state << 8) | buf[cur];
             if ((state & 0xFFFFFF00) == 0x100 && state > AVS2_SLICE_MAX_START_CODE) {
                 pc->frame_start_found = 0;