aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/avpacket.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-07-28 14:30:23 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-08-28 16:01:16 +0200
commit01bcc2d5c23fa757d163530abb396fd02f1be7c8 (patch)
tree1c15e03246819b364d1cfc691c6bbfd9db784955 /libavcodec/avpacket.c
parentdc70c19476e76f1118df73b5d97cc76f0e5f6f6c (diff)
downloadffmpeg-01bcc2d5c23fa757d163530abb396fd02f1be7c8.tar.gz
lavc: Drop deprecated destruct_packet related functions
Deprecated in 10/2012.
Diffstat (limited to 'libavcodec/avpacket.c')
-rw-r--r--libavcodec/avpacket.c56
1 files changed, 1 insertions, 55 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index bad379f2e8..dfaf045036 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -27,22 +27,6 @@
#include "libavutil/mathematics.h"
#include "libavutil/mem.h"
#include "avcodec.h"
-#if FF_API_DESTRUCT_PACKET
-
-void av_destruct_packet(AVPacket *pkt)
-{
- av_free(pkt->data);
- pkt->data = NULL;
- pkt->size = 0;
-}
-
-/* a dummy destruct callback for the callers that assume AVPacket.destruct ==
- * NULL => static data */
-static void dummy_destruct_packet(AVPacket *pkt)
-{
- av_assert0(0);
-}
-#endif
void av_init_packet(AVPacket *pkt)
{
@@ -53,11 +37,6 @@ void av_init_packet(AVPacket *pkt)
pkt->convergence_duration = 0;
pkt->flags = 0;
pkt->stream_index = 0;
-#if FF_API_DESTRUCT_PACKET
-FF_DISABLE_DEPRECATION_WARNINGS
- pkt->destruct = NULL;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
pkt->buf = NULL;
pkt->side_data = NULL;
pkt->side_data_elems = 0;
@@ -89,11 +68,6 @@ int av_new_packet(AVPacket *pkt, int size)
pkt->buf = buf;
pkt->data = buf->data;
pkt->size = size;
-#if FF_API_DESTRUCT_PACKET
-FF_DISABLE_DEPRECATION_WARNINGS
- pkt->destruct = dummy_destruct_packet;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
return 0;
}
@@ -126,11 +100,6 @@ int av_grow_packet(AVPacket *pkt, int grow_by)
if (!pkt->buf)
return AVERROR(ENOMEM);
memcpy(pkt->buf->data, pkt->data, FFMIN(pkt->size, pkt->size + grow_by));
-#if FF_API_DESTRUCT_PACKET
-FF_DISABLE_DEPRECATION_WARNINGS
- pkt->destruct = dummy_destruct_packet;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
}
pkt->data = pkt->buf->data;
pkt->size += grow_by;
@@ -151,11 +120,6 @@ int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size)
pkt->data = data;
pkt->size = size;
-#if FF_API_DESTRUCT_PACKET
-FF_DISABLE_DEPRECATION_WARNINGS
- pkt->destruct = dummy_destruct_packet;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
return 0;
}
@@ -191,23 +155,12 @@ int av_dup_packet(AVPacket *pkt)
{
AVPacket tmp_pkt;
-FF_DISABLE_DEPRECATION_WARNINGS
- if (!pkt->buf && pkt->data
-#if FF_API_DESTRUCT_PACKET
- && !pkt->destruct
-#endif
- ) {
-FF_ENABLE_DEPRECATION_WARNINGS
+ if (!pkt->buf && pkt->data) {
tmp_pkt = *pkt;
pkt->data = NULL;
pkt->side_data = NULL;
DUP_DATA(pkt->data, tmp_pkt.data, pkt->size, 1, ALLOC_BUF);
-#if FF_API_DESTRUCT_PACKET
-FF_DISABLE_DEPRECATION_WARNINGS
- pkt->destruct = dummy_destruct_packet;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (pkt->side_data_elems) {
int i;
@@ -243,15 +196,8 @@ void av_packet_free_side_data(AVPacket *pkt)
void av_free_packet(AVPacket *pkt)
{
if (pkt) {
-FF_DISABLE_DEPRECATION_WARNINGS
if (pkt->buf)
av_buffer_unref(&pkt->buf);
-#if FF_API_DESTRUCT_PACKET
- else if (pkt->destruct)
- pkt->destruct(pkt);
- pkt->destruct = NULL;
-#endif
-FF_ENABLE_DEPRECATION_WARNINGS
pkt->data = NULL;
pkt->size = 0;