X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Frv40.c;h=e9cd11092834ac5cbb635ea79a1cbe1de5309cb2;hb=e0c7ba40cf0bb521430f4a808ed1f1a408093f9c;hp=043fd724a9e35a68541ce455df04b93f5226eab5;hpb=d8901c2f018ec85e12bfd7d1a7d5dd76229db85e;p=ffmpeg diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c index 043fd724a9e..e9cd1109283 100644 --- a/libavcodec/rv40.c +++ b/libavcodec/rv40.c @@ -130,22 +130,23 @@ static int rv40_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn int mb_bits; int w = r->s.width, h = r->s.height; int mb_size; + int ret; memset(si, 0, sizeof(SliceInfo)); if(get_bits1(gb)) - return -1; + return AVERROR_INVALIDDATA; si->type = get_bits(gb, 2); if(si->type == 1) si->type = 0; si->quant = get_bits(gb, 5); if(get_bits(gb, 2)) - return -1; + return AVERROR_INVALIDDATA; si->vlc_set = get_bits(gb, 2); skip_bits1(gb); si->pts = get_bits(gb, 13); if(!si->type || !get_bits1(gb)) rv40_parse_picture_size(gb, &w, &h); - if(av_image_check_size(w, h, 0, r->s.avctx) < 0) - return -1; + if ((ret = av_image_check_size(w, h, 0, r->s.avctx)) < 0) + return ret; si->width = w; si->height = h; mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);