[FFmpeg-cvslog] alsdec: fix number of decoded samples in first sub-block in BGMC mode.

Thilo Borgmann git at videolan.org
Sun Apr 15 21:32:46 CEST 2012


ffmpeg | branch: master | Thilo Borgmann <thilo.borgmann at googlemail.com> | Sun Apr 15 18:07:12 2012 +0200| [2837d8dc276760db1821b81df3f794a90bfa56e6] | committer: Michael Niedermayer

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 at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2837d8dc276760db1821b81df3f794a90bfa56e6
---

 libavcodec/alsdec.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index bae9df6..20ef407 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);



More information about the ffmpeg-cvslog mailing list