From: "Ronald S. Bultje" <[email protected]>

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: [email protected]
---
 libavformat/asfdec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 0789960..8527246 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -1124,7 +1124,8 @@ static void asf_reset_header(AVFormatContext *s)
 
     for(i=0; i<s->nb_streams; i++){
         asf_st= s->streams[i]->priv_data;
-        av_free_packet(&asf_st->pkt);
+        if (asf_st->pkt.data)
+            av_free_packet(&asf_st->pkt);
         asf_st->frag_offset=0;
         asf_st->seq=0;
     }
-- 
1.7.9.2

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to