30l: when reading mb_offset in RV30 slice header its size

should be calculated from current frame dimensions

Originally committed as revision 16536 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Kostya Shishkov 16 years ago
parent 87609b51da
commit 42b7678d65
  1. 11
      libavcodec/rv30.c

@ -51,13 +51,12 @@ static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn
skip_bits1(gb); skip_bits1(gb);
si->pts = get_bits(gb, 13); si->pts = get_bits(gb, 13);
rpr = get_bits(gb, r->rpr); rpr = get_bits(gb, r->rpr);
if(!rpr){ if(rpr){
si->width = w; w = r->s.avctx->extradata[6 + rpr*2] << 2;
si->height = h; h = r->s.avctx->extradata[7 + rpr*2] << 2;
}else{
si->width = r->s.avctx->extradata[6 + rpr*2] << 2;
si->height = r->s.avctx->extradata[7 + rpr*2] << 2;
} }
si->width = w;
si->height = h;
mb_size = ((w + 15) >> 4) * ((h + 15) >> 4); mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);
mb_bits = ff_rv34_get_start_offset(gb, mb_size); mb_bits = ff_rv34_get_start_offset(gb, mb_size);
si->start = get_bits(gb, mb_bits); si->start = get_bits(gb, mb_bits);

Loading…
Cancel
Save