diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-12-04 19:15:37 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-12-04 19:15:37 +0000 |
commit | ac49f3eface6cdbaf86171944c8e2f5c7ec0aa84 (patch) | |
tree | 156d66230903af65e5eb7375c617dcc07be7946c /libavcodec/rv10.c | |
parent | cdb4e730e4f649379b164fe81446eb307053cb3c (diff) | |
download | ffmpeg-ac49f3eface6cdbaf86171944c8e2f5c7ec0aa84.tar.gz |
set has_b_frames correctly, fixes rv20 dr1 with mplayer
Originally committed as revision 2563 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/rv10.c')
-rw-r--r-- | libavcodec/rv10.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index ac74539b5f..2c86b03ccd 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -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)){ av_log(s->avctx, AV_LOG_ERROR, "unknown bit3 set\n"); return -1; @@ -460,9 +460,16 @@ static int rv10_decode_init(AVCodecContext *avctx) s->low_delay=1; break; case 0x20001000: - case 0x20100001: //ok + case 0x20100001: + case 0x20101001: + s->low_delay=1; + break; case 0x20200002: - case 0x20101001: //ok + case 0x30202002: + case 0x30203002: + s->low_delay=0; + s->avctx->has_b_frames=1; + break; default: 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, init_get_bits(&s->gb, buf, buf_size*8); #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("\n"); return 0; |