Commit a75ba1e1 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/h264/find_start_code: factorize addition out

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 13aa5757
......@@ -1326,10 +1326,12 @@ static int find_start_code(const uint8_t *buf, int buf_size,
buf[buf_index + 2] == 1)
break;
if (buf_index + 3 >= buf_size)
buf_index += 3;
if (buf_index >= buf_size)
return buf_size;
return buf_index + 3;
return buf_index;
}
static int get_avc_nalsize(H264Context *h, const uint8_t *buf,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment