avcodec/alsdec: Fix bitstream reading

Signed-off-by: Umair Khan <omerjerk@gmail.com>
Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Umair Khan 2016-04-27 09:04:18 +05:30 committed by Michael Niedermayer
parent 1f62a6e780
commit a2ba50b03a
1 changed files with 4 additions and 3 deletions

View File

@ -867,9 +867,6 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
*current_res++ = decode_rice(gb, s[sb]);
}
if (!sconf->mc_coding || ctx->js_switch)
align_get_bits(gb);
return 0;
}
@ -989,6 +986,7 @@ static int read_block(ALSDecContext *ctx, ALSBlockData *bd)
{
int ret;
GetBitContext *gb = &ctx->gb;
ALSSpecificConfig *sconf = &ctx->sconf;
*bd->shift_lsbs = 0;
// read block type flag and read the samples accordingly
@ -998,6 +996,9 @@ static int read_block(ALSDecContext *ctx, ALSBlockData *bd)
ret = read_const_block_data(ctx, bd);
}
if (!sconf->mc_coding || ctx->js_switch)
align_get_bits(gb);
return ret;
}