Commit ee20c26f authored by michael's avatar michael

another try at fixing rv20 ...


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3749 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ae8396a9
...@@ -429,9 +429,8 @@ static int rv20_decode_picture_header(MpegEncContext *s) ...@@ -429,9 +429,8 @@ static int rv20_decode_picture_header(MpegEncContext *s)
} }
if(s->avctx->has_b_frames){ if(s->avctx->has_b_frames){
int f1=9; int f=9;
int f2=9; int v= s->avctx->extradata_size >= 4 ? ((uint8_t*)s->avctx->extradata)[1] : 0;
int f3=9;
if (get_bits(&s->gb, 1)){ if (get_bits(&s->gb, 1)){
av_log(s->avctx, AV_LOG_ERROR, "unknown bit3 set\n"); av_log(s->avctx, AV_LOG_ERROR, "unknown bit3 set\n");
...@@ -439,18 +438,12 @@ static int rv20_decode_picture_header(MpegEncContext *s) ...@@ -439,18 +438,12 @@ static int rv20_decode_picture_header(MpegEncContext *s)
} }
seq= get_bits(&s->gb, 14)<<1; seq= get_bits(&s->gb, 14)<<1;
if(s->avctx->extradata_size >= 4 && ((uint8_t*)s->avctx->extradata)[1]&1){ if(v>1){
f1= get_bits(&s->gb, 1); f= get_bits(&s->gb, av_log2(v-1)+1);
}
if(s->avctx->extradata_size >= 4 && ((uint8_t*)s->avctx->extradata)[1]&2){
f2= get_bits(&s->gb, 1);
}
if(s->avctx->extradata_size >= 4 && ((uint8_t*)s->avctx->extradata)[1]&4){
f3= get_bits(&s->gb, 2);
} }
if(s->avctx->debug & FF_DEBUG_PICT_INFO){ if(s->avctx->debug & FF_DEBUG_PICT_INFO){
av_log(s->avctx, AV_LOG_DEBUG, "F %d %d %d\n", f1,f2,f3); av_log(s->avctx, AV_LOG_DEBUG, "F %d\n", f);
} }
mb_pos= get_bits(&s->gb, av_log2(s->mb_num-1)+1); mb_pos= get_bits(&s->gb, av_log2(s->mb_num-1)+1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment