aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/alsdec.c
diff options
context:
space:
mode:
authorThilo Borgmann <thilo.borgmann@googlemail.com>2012-04-15 18:07:12 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-15 20:20:37 +0200
commit2837d8dc276760db1821b81df3f794a90bfa56e6 (patch)
treec04a9597af1b5fc9737f91a52937980aa47b8fc7 /libavcodec/alsdec.c
parent44c4170c52c10e3da3a7ea8e3435ef37c4edc2cc (diff)
downloadffmpeg-2837d8dc276760db1821b81df3f794a90bfa56e6.tar.gz
alsdec: fix number of decoded samples in first sub-block in BGMC mode.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/alsdec.c')
-rw-r--r--libavcodec/alsdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index bae9df6173..20ef40774e 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -785,10 +785,10 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
k [sb] = s[sb] > b ? s[sb] - b : 0;
delta[sb] = 5 - s[sb] + k[sb];
- ff_bgmc_decode(gb, sb_length, current_res,
+ ff_bgmc_decode(gb, sb_length - i, current_res,
delta[sb], sx[sb], &high, &low, &value, ctx->bgmc_lut, ctx->bgmc_lut_status);
- current_res += sb_length;
+ current_res += sb_length - i;
}
ff_bgmc_decode_end(gb);