[FFmpeg-soc] [soc]: r2460 - wmapro/wma3dec.c

faust3 subversion at mplayerhq.hu
Sun Jun 15 17:14:26 CEST 2008


Author: faust3
Date: Sun Jun 15 17:14:26 2008
New Revision: 2460

Log:
made the code that skips the remaining frame data a bit more generic

Modified:
   wmapro/wma3dec.c

Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c	(original)
+++ wmapro/wma3dec.c	Sun Jun 15 17:14:26 2008
@@ -167,6 +167,7 @@ static av_cold int wma3_decode_init(AVCo
 
 /* decode one wma frame */
 static int wma_decode_frame(WMA3DecodeContext *s,GetBitContext* gb){
+    unsigned int gb_start_count = get_bits_count(gb);
     int more_frames = 0;
     /* get frame length */
     int len = 0;
@@ -176,8 +177,8 @@ static int wma_decode_frame(WMA3DecodeCo
 
     av_log(s->avctx,AV_LOG_INFO,"decoding frame with len %x\n",len);
 
-    /* decode frame data */
-    skip_bits_long(gb,len - s->log2_frame_size - 1);
+    /* skip the rest of the frame data */
+    skip_bits_long(gb,len - (get_bits_count(gb) - gb_start_count) - 1);
 
     /* decode trailer bit */
     more_frames = get_bits1(gb);



More information about the FFmpeg-soc mailing list