From ce1d9c851cf73d33a99562a9d4ddb435fbc73228 Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Thu, 30 Apr 2009 12:06:34 +0000 Subject: [PATCH] Export av_free_packet(). Originally committed as revision 18719 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/avcodec.h | 10 ++-------- libavcodec/avpacket.c | 8 ++++++++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index a857baf72a..73181c1d1b 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -30,7 +30,7 @@ #include "libavutil/avutil.h" #define LIBAVCODEC_VERSION_MAJOR 52 -#define LIBAVCODEC_VERSION_MINOR 27 +#define LIBAVCODEC_VERSION_MINOR 28 #define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ @@ -2681,13 +2681,7 @@ int av_dup_packet(AVPacket *pkt); * * @param pkt packet to free */ -static inline void av_free_packet(AVPacket *pkt) -{ - if (pkt) { - if (pkt->destruct) pkt->destruct(pkt); - pkt->data = NULL; pkt->size = 0; - } -} +void av_free_packet(AVPacket *pkt); /* resample.c */ 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; + } +}