Browse Source

Reject slices that does not have the same type than the first one in RV10/RV20 decoder.

This prevents crashes with some corrupted bitstreams.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.9
Laurent Aimar Michael Niedermayer 13 years ago
parent
commit
d788af6cf6
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/rv10.c

+ 4
- 0
libavcodec/rv10.c View File

@@ -547,8 +547,12 @@ static int rv10_decode_packet(AVCodecContext *avctx,
if(MPV_frame_start(s, avctx) < 0) if(MPV_frame_start(s, avctx) < 0)
return -1; return -1;
ff_er_frame_start(s); ff_er_frame_start(s);
} else {
if (s->current_picture_ptr->f.pict_type != s->pict_type)
return -1;
} }



av_dlog(avctx, "qscale=%d\n", s->qscale); av_dlog(avctx, "qscale=%d\n", s->qscale);


/* default quantization values */ /* default quantization values */


Loading…
Cancel
Save