Commit a2ba50b0 authored by Umair Khan's avatar Umair Khan Committed by Michael Niedermayer

avcodec/alsdec: Fix bitstream reading

Signed-off-by: 's avatarUmair Khan <omerjerk@gmail.com>
Reviewed-by: 's avatarThilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1f62a6e7
...@@ -867,9 +867,6 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd) ...@@ -867,9 +867,6 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
*current_res++ = decode_rice(gb, s[sb]); *current_res++ = decode_rice(gb, s[sb]);
} }
if (!sconf->mc_coding || ctx->js_switch)
align_get_bits(gb);
return 0; return 0;
} }
...@@ -989,6 +986,7 @@ static int read_block(ALSDecContext *ctx, ALSBlockData *bd) ...@@ -989,6 +986,7 @@ static int read_block(ALSDecContext *ctx, ALSBlockData *bd)
{ {
int ret; int ret;
GetBitContext *gb = &ctx->gb; GetBitContext *gb = &ctx->gb;
ALSSpecificConfig *sconf = &ctx->sconf;
*bd->shift_lsbs = 0; *bd->shift_lsbs = 0;
// read block type flag and read the samples accordingly // read block type flag and read the samples accordingly
...@@ -998,6 +996,9 @@ static int read_block(ALSDecContext *ctx, ALSBlockData *bd) ...@@ -998,6 +996,9 @@ static int read_block(ALSDecContext *ctx, ALSBlockData *bd)
ret = read_const_block_data(ctx, bd); ret = read_const_block_data(ctx, bd);
} }
if (!sconf->mc_coding || ctx->js_switch)
align_get_bits(gb);
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment