forked from FFmpeg/FFmpeg
avcodec/h264/find_start_code: factorize addition out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
13aa575764
commit
a75ba1e116
1 changed files with 4 additions and 2 deletions
|
@ -1326,10 +1326,12 @@ static int find_start_code(const uint8_t *buf, int buf_size,
|
||||||
buf[buf_index + 2] == 1)
|
buf[buf_index + 2] == 1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (buf_index + 3 >= buf_size)
|
buf_index += 3;
|
||||||
|
|
||||||
|
if (buf_index >= buf_size)
|
||||||
return buf_size;
|
return buf_size;
|
||||||
|
|
||||||
return buf_index + 3;
|
return buf_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_avc_nalsize(H264Context *h, const uint8_t *buf,
|
static int get_avc_nalsize(H264Context *h, const uint8_t *buf,
|
||||||
|
|
Loading…
Add table
Reference in a new issue