@@ -1768,7 +1768,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
if (avctx->hwaccel && avctx->hwaccel->decode_slice) {
const uint8_t *buf_end, *buf_start = *buf - 4; /* include start_code */
- int start_code = -1;
+ uint32_t start_code = ~0;
buf_end = avpriv_find_start_code(buf_start + 2, *buf + buf_size, &start_code);
if (buf_end < *buf + buf_size)
buf_end -= 4;
@@ -51,11 +51,10 @@ void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size)
end_of_slice = 1;
} else {
const uint8_t *r, *r1;
- int start_code;
r1 = buf1;
while (1) {
- start_code = -1;
+ uint32_t start_code = ~0;
r = avpriv_find_start_code(r1, end, &start_code);
if (start_code_is_valid(start_code)) {
/* New start code found */