diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-11-19 18:19:36 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-11-19 18:19:36 +0000 |
commit | 9993064eec81ad5dc346e447497ecedc56a8fea6 (patch) | |
tree | 1abce46b0711731f1c2fc0c68b0f39ffa51d7258 /libavcodec | |
parent | f7ff7bc6484d4e45a50e38119826f99318fd5bfb (diff) | |
download | ffmpeg-streaming-9993064eec81ad5dc346e447497ecedc56a8fea6.zip ffmpeg-streaming-9993064eec81ad5dc346e447497ecedc56a8fea6.tar.gz |
fixing rv20201002
Originally committed as revision 3694 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/rv10.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index c248ab5..65a741c 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -401,9 +401,13 @@ static int rv20_decode_picture_header(MpegEncContext *s) av_log(s->avctx, AV_LOG_ERROR, "unknown bit4 set\n"); // return -1; } - mb_pos= get_bits(&s->gb, av_log2(s->mb_num-1)+1); - s->mb_x= mb_pos % s->mb_width; - s->mb_y= mb_pos / s->mb_width; + if(s->avctx->sub_id == 0x20201002){ + mb_pos= ff_h263_decode_mba(s); + }else{ + mb_pos= get_bits(&s->gb, av_log2(s->mb_num-1)+1); + s->mb_x= mb_pos % s->mb_width; + s->mb_y= mb_pos / s->mb_width; + } }else{ seq= get_bits(&s->gb, 8)*128; mb_pos= ff_h263_decode_mba(s); @@ -504,7 +508,7 @@ static int rv10_decode_init(AVCodecContext *avctx) default: av_log(s->avctx, AV_LOG_ERROR, "unknown header %X\n", avctx->sub_id); } -//printf("ver:%X\n", avctx->sub_id); +//av_log(avctx, AV_LOG_DEBUG, "ver:%X\n", avctx->sub_id); if (MPV_common_init(s) < 0) return -1; @@ -686,8 +690,8 @@ static int rv10_decode_frame(AVCodecContext *avctx, *pict= *(AVFrame*)&s->last_picture; ff_print_debug_info(s, pict); } - - *data_size = sizeof(AVFrame); + if(s->last_picture_ptr || s->low_delay) + *data_size = sizeof(AVFrame); } return buf_size; |