changeset 163:470456bd0065 libavformat

av_free_packet SEGV fix by (Arthur van Hoff (javanator))
author michaelni
date Fri, 04 Jul 2003 23:48:20 +0000
parents 35386fc4d47d
children 99fbacf0f764
files avformat.h
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/avformat.h	Fri Jul 04 23:08:16 2003 +0000
+++ b/avformat.h	Fri Jul 04 23:48:20 2003 +0000
@@ -45,7 +45,9 @@
  */
 static inline void av_free_packet(AVPacket *pkt)
 {
-    pkt->destruct(pkt);
+    if (pkt && pkt->destruct) {
+	pkt->destruct(pkt);
+    }
 }
 
 /*************************************************/