From 40a3105d46587151d822bc7d65276e4c36ca6c6b Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michaelni@gmx.at>
Date: Sun, 18 Jan 2004 21:57:32 +0000
Subject: [PATCH] segfault fix

Originally committed as revision 2714 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/wmadec.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index 15b15f23f01..25498c4d28c 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -1187,6 +1187,11 @@ static int wma_decode_superframe(AVCodecContext *avctx,
     
     tprintf("***decode_superframe:\n");
 
+    if(buf_size==0){
+        s->last_superframe_len = 0;
+        return 0;
+    }
+    
     samples = data;
 
     init_get_bits(&s->gb, buf, buf_size*8);
-- 
GitLab