diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2012-03-20 07:53:41 +0100 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2012-03-20 16:33:57 +0100 |
commit | 8ae28ac0f37a9971bcf0ed82e591ebd582479fde (patch) | |
tree | bb40dffdedcad57a0a020b259af62523f357c7cc | |
parent | 2ac3df858c3afdc1e3a8e19670483a379f7da447 (diff) | |
download | ffmpeg-8ae28ac0f37a9971bcf0ed82e591ebd582479fde.tar.gz |
bink: align plane width to 8 when calculating bundle sizes
This fixes decoding of Bink files with non-multiple-of-16 width.
-rw-r--r-- | libavcodec/bink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/bink.c b/libavcodec/bink.c index f8a9b5bc73..7a08f49a82 100644 --- a/libavcodec/bink.c +++ b/libavcodec/bink.c @@ -146,6 +146,8 @@ enum BlockTypes { */ static void init_lengths(BinkContext *c, int width, int bw) { + width = FFALIGN(width, 7); + c->bundle[BINK_SRC_BLOCK_TYPES].len = av_log2((width >> 3) + 511) + 1; c->bundle[BINK_SRC_SUB_BLOCK_TYPES].len = av_log2((width >> 4) + 511) + 1; |