Unified · Split
| @@ -34,9 +34,9 @@ static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_siz · 33 unmodified lines | |||
| 34 | 34 | ||
| 35 | if (!pic_found) { | 35 | if (!pic_found) { |
| 36 | for (; cur < buf_size; ++cur) { | 36 | for (; cur < buf_size; ++cur) { |
| 37 | state = (state<<8) | buf[cur]; | 37 | state = (state << 8) | buf[cur]; |
| 38 | if (AVS2_ISUNIT(buf[cur])){ | 38 | if (AVS2_ISUNIT(buf[cur])){ |
| 39 | ++cur; | 39 | cur++; |
| 40 | pic_found = 1; | 40 | pic_found = 1; |
| 41 | break; | 41 | break; |
| 42 | } | 42 | } |
| @@ -46,7 +46,7 @@ static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_siz · 3 unmodified lines | |||
| 46 | if (pic_found) { | 46 | if (pic_found) { |
| 47 | if (!buf_size) | 47 | if (!buf_size) |
| 48 | return END_NOT_FOUND; | 48 | return END_NOT_FOUND; |
| 49 | for (; cur < buf_size; ++cur) { | 49 | for (; cur < buf_size; cur++) { |
| 50 | state = (state << 8) | buf[cur]; | 50 | state = (state << 8) | buf[cur]; |
| 51 | if ((state & 0xFFFFFF00) == 0x100 && state > AVS2_SLICE_MAX_START_CODE) { | 51 | if ((state & 0xFFFFFF00) == 0x100 && state > AVS2_SLICE_MAX_START_CODE) { |
| 52 | pc->frame_start_found = 0; | 52 | pc->frame_start_found = 0; |