summaryrefslogtreecommitdiff
path: root/libavcodec/avpacket.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-07 03:40:15 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-07 03:40:15 +0200
commitb60938e4fd0504df5d1bf46e7ba0772c78904a67 (patch)
tree5aa254482c64eb2df66846450b5c1626bd61194b /libavcodec/avpacket.c
parent5c50214eed19d039a162c5e16d6ee14bdf21500b (diff)
downloadffmpeg-b60938e4fd0504df5d1bf46e7ba0772c78904a67.tar.gz
avcodec/avpacket: simplify freeing pkt->data
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/avpacket.c')
-rw-r--r--libavcodec/avpacket.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index a87e8e3ead..9978712bb8 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -34,8 +34,7 @@
void av_destruct_packet(AVPacket *pkt)
{
- av_free(pkt->data);
- pkt->data = NULL;
+ av_freep(&pkt->data);
pkt->size = 0;
}