avcodec/avpacket: simplify freeing pkt->data
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 7 Oct 2014 01:40:15 +0000 (03:40 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 7 Oct 2014 01:40:15 +0000 (03:40 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/avpacket.c

index a87e8e3..9978712 100644 (file)
@@ -34,8 +34,7 @@
 
 void av_destruct_packet(AVPacket *pkt)
 {
-    av_free(pkt->data);
-    pkt->data = NULL;
+    av_freep(&pkt->data);
     pkt->size = 0;
 }