Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2009-01-11 13:50:00 +0300
committerKostya Shishkov <kostya.shishkov@gmail.com>2009-01-11 13:50:00 +0300
commit42b7678d655dbe1f8ce0f27bdea8ec778973a81d (patch)
treeefcd9bde9a30a9aeda0fa4e2c43735a28802a1b2 /libavcodec/rv30.c
parent87609b51da6c7f8f121607da9e0fb4fbb2392247 (diff)
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
Diffstat (limited to 'libavcodec/rv30.c')
-rw-r--r--libavcodec/rv30.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c
index 0528f010b6..0c6f343c9e 100644
--- a/libavcodec/rv30.c
+++ b/libavcodec/rv30.c
@@ -51,13 +51,12 @@ static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn
skip_bits1(gb);
si->pts = get_bits(gb, 13);
rpr = get_bits(gb, r->rpr);
- if(!rpr){
- si->width = w;
- si->height = h;
- }else{
- si->width = r->s.avctx->extradata[6 + rpr*2] << 2;
- si->height = r->s.avctx->extradata[7 + rpr*2] << 2;
+ if(rpr){
+ w = r->s.avctx->extradata[6 + rpr*2] << 2;
+ h = r->s.avctx->extradata[7 + rpr*2] << 2;
}
+ si->width = w;
+ si->height = h;
mb_size = ((w + 15) >> 4) * ((h + 15) >> 4);
mb_bits = ff_rv34_get_start_offset(gb, mb_size);
si->start = get_bits(gb, mb_bits);