[FFmpeg-cvslog] libavcodec: remove av_destruct_packet_nofree()

Mans Rullgard git at videolan.org
Sun Sep 16 14:29:17 CEST 2012


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Sat Aug 25 11:51:57 2012 +0100| [cb6632809d27a0dfe2f63fea1c656bd39ce046ed] | committer: Mans Rullgard

libavcodec: remove av_destruct_packet_nofree()

This function was deprecated two major versions ago (2009).

Signed-off-by: Mans Rullgard <mans at mansr.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cb6632809d27a0dfe2f63fea1c656bd39ce046ed
---

 libavcodec/avcodec.h  |    5 -----
 libavcodec/avpacket.c |   11 +----------
 2 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 8a091bd..d0c5e07 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3334,11 +3334,6 @@ void avsubtitle_free(AVSubtitle *sub);
  */
 
 /**
- * @deprecated use NULL instead
- */
-attribute_deprecated void av_destruct_packet_nofree(AVPacket *pkt);
-
-/**
  * Default packet destructor.
  */
 void av_destruct_packet(AVPacket *pkt);
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 3344cf9..cb24948 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -25,14 +25,6 @@
 #include "libavutil/mem.h"
 #include "avcodec.h"
 
-void av_destruct_packet_nofree(AVPacket *pkt)
-{
-    pkt->data            = NULL;
-    pkt->size            = 0;
-    pkt->side_data       = NULL;
-    pkt->side_data_elems = 0;
-}
-
 void av_destruct_packet(AVPacket *pkt)
 {
     int i;
@@ -131,8 +123,7 @@ int av_dup_packet(AVPacket *pkt)
 {
     AVPacket tmp_pkt;
 
-    if (((pkt->destruct == av_destruct_packet_nofree) ||
-         (pkt->destruct == NULL)) && pkt->data) {
+    if (pkt->destruct == NULL && pkt->data) {
         tmp_pkt = *pkt;
 
         pkt->data      = NULL;



More information about the ffmpeg-cvslog mailing list