Browse Source

bink: align plane width to 8 when calculating bundle sizes

This fixes decoding of Bink files with non-multiple-of-16 width.
tags/n0.11
Kostya Shishkov 13 years ago
parent
commit
8ae28ac0f3
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/bink.c

+ 2
- 0
libavcodec/bink.c View File

@@ -146,6 +146,8 @@ enum BlockTypes {
*/ */
static void init_lengths(BinkContext *c, int width, int bw) 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_BLOCK_TYPES].len = av_log2((width >> 3) + 511) + 1;


c->bundle[BINK_SRC_SUB_BLOCK_TYPES].len = av_log2((width >> 4) + 511) + 1; c->bundle[BINK_SRC_SUB_BLOCK_TYPES].len = av_log2((width >> 4) + 511) + 1;


Loading…
Cancel
Save