aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUmair Khan <omerjerk@gmail.com>2016-04-27 09:04:18 +0530
committerMichael Niedermayer <michael@niedermayer.cc>2016-04-27 13:15:12 +0200
commita2ba50b03a085993eb5bb9baf947e21d1c0060e1 (patch)
treef16941cad9ad30fa6da9114e5323d653c1c5c1b9
parent1f62a6e7803e4b354b2f1a7c9a5d617efa39999b (diff)
downloadffmpeg-a2ba50b03a085993eb5bb9baf947e21d1c0060e1.tar.gz
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>
-rw-r--r--libavcodec/alsdec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 89e281aaa3..842fc7dc76 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -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;
}