Browse Source

avcodec/rv30: put the rpr check back in init with the max vs bits bug fixed

Its usefull to know immediatly if extradata is wrong and not just when later
the decoder tries to use it.

This check was removed by: a6a2282c25
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 12 years ago
parent
commit
be524ffc16
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/rv30.c

+ 4
- 0
libavcodec/rv30.c View File

@@ -267,6 +267,10 @@ static av_cold int rv30_decode_init(AVCodecContext *avctx)
} }


r->max_rpr = avctx->extradata[1] & 7; r->max_rpr = avctx->extradata[1] & 7;
if(avctx->extradata_size < 2*r->max_rpr + 8){
av_log(avctx, AV_LOG_WARNING, "Insufficient extradata - need at least %d bytes, got %d\n",
2*r->max_rpr + 8, avctx->extradata_size);
}


r->parse_slice_header = rv30_parse_slice_header; r->parse_slice_header = rv30_parse_slice_header;
r->decode_intra_types = rv30_decode_intra_types; r->decode_intra_types = rv30_decode_intra_types;


Loading…
Cancel
Save