Mercurial > libavcodec.hg
diff mpeg12.c @ 3776:1843a85123b7 libavcodec
fix some signedness warnings
author | mru |
---|---|
date | Wed, 27 Sep 2006 19:47:39 +0000 |
parents | d60dc0a7dee6 |
children | c8c591fe26f8 |
line wrap: on
line diff
--- a/mpeg12.c Wed Sep 27 19:46:19 2006 +0000 +++ b/mpeg12.c Wed Sep 27 19:47:39 2006 +0000 @@ -2695,7 +2695,8 @@ s->error_count= 3*(s->end_mb_y - s->start_mb_y)*s->mb_width; for(;;){ - int start_code, ret; + uint32_t start_code; + int ret; ret= mpeg_decode_slice((Mpeg1Context*)s, mb_y, &buf, s->gb.buffer_end - buf); emms_c(); @@ -3033,7 +3034,8 @@ Mpeg1Context *s = avctx->priv_data; const uint8_t *buf_end; const uint8_t *buf_ptr; - int ret, start_code, input_size; + uint32_t start_code; + int ret, input_size; AVFrame *picture = data; MpegEncContext *s2 = &s->mpeg_enc_ctx; dprintf("fill_buffer\n"); @@ -3080,7 +3082,7 @@ /* find start next code */ start_code = -1; buf_ptr = ff_find_start_code(buf_ptr,buf_end, &start_code); - if (start_code < 0){ + if (start_code > 0x1ff){ if(s2->pict_type != B_TYPE || avctx->skip_frame <= AVDISCARD_DEFAULT){ if(avctx->thread_count > 1){ int i;