aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/indeo4.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2013-05-25 12:35:12 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2013-05-28 14:10:58 +0200
commit2cf5d291104d38771407441193bc1fd931aa9984 (patch)
treea6200c93d6620670b50b69e5def5da7b0d9982e4 /libavcodec/indeo4.c
parent6647aa0426e73839b9b1d1c9d86188f469167531 (diff)
downloadffmpeg-2cf5d291104d38771407441193bc1fd931aa9984.tar.gz
indeo4: reuse context block VLC for band instead of defaulting
Currently if no custom block VLC is specified for band, a default block VLC will be used, while the global block VLC stored in the context should be used instead. This fixes decoding of one sample I have.
Diffstat (limited to 'libavcodec/indeo4.c')
-rw-r--r--libavcodec/indeo4.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index eb34688775..75714350a4 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -362,9 +362,12 @@ static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band,
}
/* decode block huffman codebook */
- if (ff_ivi_dec_huff_desc(&ctx->gb, get_bits1(&ctx->gb), IVI_BLK_HUFF,
- &band->blk_vlc, avctx))
- return AVERROR_INVALIDDATA;
+ if (!get_bits1(&ctx->gb))
+ band->blk_vlc.tab = ctx->blk_vlc.tab;
+ else
+ if (ff_ivi_dec_huff_desc(&ctx->gb, 1, IVI_BLK_HUFF,
+ &band->blk_vlc, avctx))
+ return AVERROR_INVALIDDATA;
/* select appropriate rvmap table for this band */
band->rvmap_sel = get_bits1(&ctx->gb) ? get_bits(&ctx->gb, 3) : 8;