mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavc/avs2_parser.c: optimize code style
Signed-off-by: hwren <hwrenx@126.com>
This commit is contained in:
parent
b15e875c8c
commit
de0a555898
@ -36,7 +36,7 @@ static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_siz
|
|||||||
for (; cur < buf_size; ++cur) {
|
for (; cur < buf_size; ++cur) {
|
||||||
state = (state << 8) | buf[cur];
|
state = (state << 8) | buf[cur];
|
||||||
if (AVS2_ISUNIT(buf[cur])){
|
if (AVS2_ISUNIT(buf[cur])){
|
||||||
++cur;
|
cur++;
|
||||||
pic_found = 1;
|
pic_found = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_siz
|
|||||||
if (pic_found) {
|
if (pic_found) {
|
||||||
if (!buf_size)
|
if (!buf_size)
|
||||||
return END_NOT_FOUND;
|
return END_NOT_FOUND;
|
||||||
for (; cur < buf_size; ++cur) {
|
for (; cur < buf_size; cur++) {
|
||||||
state = (state << 8) | buf[cur];
|
state = (state << 8) | buf[cur];
|
||||||
if ((state & 0xFFFFFF00) == 0x100 && state > AVS2_SLICE_MAX_START_CODE) {
|
if ((state & 0xFFFFFF00) == 0x100 && state > AVS2_SLICE_MAX_START_CODE) {
|
||||||
pc->frame_start_found = 0;
|
pc->frame_start_found = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user