ffmpeg | branch: master | Umair Khan <omerj...@gmail.com> | Wed Apr 27 09:22:18 
2016 +0530| [a2ba50b03a085993eb5bb9baf947e21d1c0060e1] | committer: Michael 
Niedermayer

avcodec/alsdec: Fix bitstream reading

Signed-off-by: Umair Khan <omerj...@gmail.com>
Reviewed-by: Thilo Borgmann <thilo.borgm...@mail.de>
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

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

 libavcodec/alsdec.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 89e281a..842fc7d 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;
 }
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to