diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-08-28 09:19:28 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-08-28 09:19:28 +0000 |
commit | ee3b2be65da55cfe1fc17d1db75738535f99ceef (patch) | |
tree | 0206600868c8b28bacd619c4b0a77283f181d534 /libavcodec/rv10.c | |
parent | 077871863579cc3d7c04604bec3f9f075fddc0e7 (diff) | |
download | ffmpeg-ee3b2be65da55cfe1fc17d1db75738535f99ceef.tar.gz |
fixes rv10 decoding crash
Originally committed as revision 873 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/rv10.c')
-rw-r--r-- | libavcodec/rv10.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 2483059296..7562cbb2fe 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -296,6 +296,10 @@ static int rv10_decode_picture_header(MpegEncContext *s) return -1; s->qscale = get_bits(&s->gb, 5); + if(s->qscale==0){ + fprintf(stderr, "error, qscale:0\n"); + return -1; + } if (s->pict_type == I_TYPE) { if (s->rv10_version == 3) { @@ -322,7 +326,7 @@ static int rv10_decode_picture_header(MpegEncContext *s) s->mb_y = 0; mb_count = s->mb_width * s->mb_height; } - +//printf("%d\n", get_bits(&s->gb, 3)); get_bits(&s->gb, 3); /* ignored */ s->f_code = 1; s->unrestricted_mv = 1; @@ -353,6 +357,9 @@ static int rv10_decode_init(AVCodecContext *avctx) h263_decode_init_vlc(s); + s->y_dc_scale_table= + s->c_dc_scale_table= ff_mpeg1_dc_scale_table; + /* init rv vlc */ if (!done) { init_vlc(&rv_dc_lum, DC_VLC_BITS, 256, |