diff options
Diffstat (limited to 'libavcodec/avpacket.c')
-rw-r--r-- | libavcodec/avpacket.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index 194324713f..5bea639d66 100644 --- a/libavcodec/avpacket.c +++ b/libavcodec/avpacket.c @@ -87,3 +87,11 @@ int av_dup_packet(AVPacket *pkt) } return 0; } + +void av_free_packet(AVPacket *pkt) +{ + if (pkt) { + if (pkt->destruct) pkt->destruct(pkt); + pkt->data = NULL; pkt->size = 0; + } +} |