Commit ac49f3ef authored by Michael Niedermayer's avatar Michael Niedermayer

set has_b_frames correctly, fixes rv20 dr1 with mplayer

Originally committed as revision 2563 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent cdb4e730
...@@ -376,7 +376,7 @@ static int rv20_decode_picture_header(MpegEncContext *s) ...@@ -376,7 +376,7 @@ static int rv20_decode_picture_header(MpegEncContext *s)
} }
} }
if(s->avctx->sub_id == 0x20200002 || s->avctx->sub_id == 0x30202002 || s->avctx->sub_id == 0x30203002){ if(s->avctx->has_b_frames){
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");
return -1; return -1;
...@@ -460,9 +460,16 @@ static int rv10_decode_init(AVCodecContext *avctx) ...@@ -460,9 +460,16 @@ static int rv10_decode_init(AVCodecContext *avctx)
s->low_delay=1; s->low_delay=1;
break; break;
case 0x20001000: case 0x20001000:
case 0x20100001: //ok case 0x20100001:
case 0x20101001:
s->low_delay=1;
break;
case 0x20200002: case 0x20200002:
case 0x20101001: //ok case 0x30202002:
case 0x30203002:
s->low_delay=0;
s->avctx->has_b_frames=1;
break;
default: default:
av_log(s->avctx, AV_LOG_ERROR, "unknown header %X\n", avctx->sub_id); av_log(s->avctx, AV_LOG_ERROR, "unknown header %X\n", avctx->sub_id);
} }
...@@ -508,7 +515,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, ...@@ -508,7 +515,7 @@ static int rv10_decode_packet(AVCodecContext *avctx,
init_get_bits(&s->gb, buf, buf_size*8); init_get_bits(&s->gb, buf, buf_size*8);
#if 0 #if 0
for(i=0; i<buf_size*8 && i<100; i++) for(i=0; i<buf_size*8 && i<200; i++)
printf("%d", get_bits1(&s->gb)); printf("%d", get_bits1(&s->gb));
printf("\n"); printf("\n");
return 0; return 0;
......
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