diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-03-27 18:36:51 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-08-02 19:19:02 +0200 |
commit | 7950e519bb094897f957b9a9531cc60ba46cbc91 (patch) | |
tree | b8bcd2acc2a699c2c219e690d439a3f3eb0a6a44 /libavcodec/avpacket.c | |
parent | 3a7050ffed5ce061b114a11e4de4b77aba8efa0b (diff) | |
download | ffmpeg-7950e519bb094897f957b9a9531cc60ba46cbc91.tar.gz |
Disable deprecation warnings for cases where a replacement is available
Diffstat (limited to 'libavcodec/avpacket.c')
-rw-r--r-- | libavcodec/avpacket.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index df88f3f186..2fc8bc00d1 100644 --- a/libavcodec/avpacket.c +++ b/libavcodec/avpacket.c @@ -23,6 +23,7 @@ #include "libavutil/avassert.h" #include "libavutil/common.h" +#include "libavutil/internal.h" #include "libavutil/mem.h" #include "avcodec.h" @@ -52,7 +53,9 @@ void av_init_packet(AVPacket *pkt) 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; @@ -77,7 +80,9 @@ int av_new_packet(AVPacket *pkt, int size) 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; @@ -112,7 +117,9 @@ int av_grow_packet(AVPacket *pkt, int grow_by) 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; @@ -135,7 +142,9 @@ 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; @@ -172,18 +181,22 @@ 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 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) { @@ -213,6 +226,7 @@ void av_free_packet(AVPacket *pkt) if (pkt) { int i; +FF_DISABLE_DEPRECATION_WARNINGS if (pkt->buf) av_buffer_unref(&pkt->buf); #if FF_API_DESTRUCT_PACKET @@ -220,6 +234,7 @@ void av_free_packet(AVPacket *pkt) pkt->destruct(pkt); pkt->destruct = NULL; #endif +FF_ENABLE_DEPRECATION_WARNINGS pkt->data = NULL; pkt->size = 0; |