summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-04 04:18:43 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-04 04:33:01 +0100
commitbe524ffc16bf14cab0ad112b0dcb48d09a2a40ff (patch)
tree0b2f2437d247511f6dfbdd6582de61886a40d98b /libavcodec
parentd08c6e1101aa3f59d819f5c4aeef2d298e1b785c (diff)
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: a6a2282c25abe43e352010a7c3fbc92994c0bc1c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/rv30.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c
index 901ba89618..dff4117df2 100644
--- a/libavcodec/rv30.c
+++ b/libavcodec/rv30.c
@@ -267,6 +267,10 @@ static av_cold int rv30_decode_init(AVCodecContext *avctx)
}
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->decode_intra_types = rv30_decode_intra_types;