diff avpacket.c @ 9584:e30999f7a631 libavcodec

Export av_free_packet().
author ramiro
date Thu, 30 Apr 2009 12:06:34 +0000
parents d322325fc00e
children 158f0ea08e82
line wrap: on
line diff
--- a/avpacket.c	Thu Apr 30 10:21:22 2009 +0000
+++ b/avpacket.c	Thu Apr 30 12:06:34 2009 +0000
@@ -87,3 +87,11 @@
     }
     return 0;
 }
+
+void av_free_packet(AVPacket *pkt)
+{
+    if (pkt) {
+        if (pkt->destruct) pkt->destruct(pkt);
+        pkt->data = NULL; pkt->size = 0;
+    }
+}