diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2008-04-26 05:03:36 +0000 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2008-04-26 05:03:36 +0000 |
commit | 630e1b27c2f9a6327c994d136143ca1df7ce4677 (patch) | |
tree | bc7c71e5e4b22da5789cdf0324ce43de21f514ad /libavcodec/mimic.c | |
parent | a9f1d8cdf6d91c4d0ca2684b45e60bd4d46f7423 (diff) | |
download | ffmpeg-630e1b27c2f9a6327c994d136143ca1df7ce4677.tar.gz |
get_vlc2() only gets up to three levels in the tables. The last codes weren't being read properly.
Originally committed as revision 12976 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mimic.c')
-rw-r--r-- | libavcodec/mimic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index 7687f0ef68..b18b9c27ed 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -110,7 +110,7 @@ static av_cold int mimic_decode_init(AVCodecContext *avctx) ctx->prev_index = 0; ctx->cur_index = 15; - if(init_vlc(&ctx->vlc, 8, sizeof(huffbits)/sizeof(huffbits[0]), + if(init_vlc(&ctx->vlc, 11, sizeof(huffbits)/sizeof(huffbits[0]), huffbits, 1, 1, huffcodes, 4, 4, 0)) { av_log(avctx, AV_LOG_ERROR, "error initializing vlc table\n"); return -1; @@ -172,7 +172,7 @@ static int vlc_decode_block(MimicContext *ctx, int num_coeffs, int qscale) int value; int coeff; - vlc = get_vlc2(&ctx->gb, ctx->vlc.table, ctx->vlc.bits, 4); + vlc = get_vlc2(&ctx->gb, ctx->vlc.table, ctx->vlc.bits, 3); if(!vlc) /* end-of-block code */ return 1; if(vlc == -1) |