Le Mon, 20 May 2013 13:55:18 +0200,
Reinhard Tartler <[email protected]> a écrit :

> Hi Laurent,

Hello,
 
> I'm happy to hear that this patch works for you. Unfortunately, it
> does not apply cleanly, I guess text conflicts in the source file.
> Can you perhaps send the updated patch that you are currently using,
> so that we can review and apply it to libav/master?

My patch was based on 0.8.3, I've rebased it against master (the changes
are the same), it's compiling but I didn't test it, I Unfortunately
cannot find the file that was triggering the infinite loop.

Cheers

Laurent Bigonville
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index b9b176e..5d0aac7 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -812,7 +812,8 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data,
                buf_size, avctx->block_align);
         return AVERROR_INVALIDDATA;
     }
-    buf_size = avctx->block_align;
+    if(avctx->block_align)
+        buf_size = avctx->block_align;
 
     init_get_bits(&s->gb, buf, buf_size*8);
 
@@ -911,7 +912,7 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data,
 
     *got_frame_ptr = 1;
 
-    return avctx->block_align;
+    return buf_size;
  fail:
     /* when error, we reset the bit reservoir */
     s->last_superframe_len = 0;

Reply via email to