summaryrefslogtreecommitdiffstats
path: root/libavcodec/avpacket.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-03 10:08:30 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-03 10:08:30 +0200
commit20be5e0a0e7563671efe0f085c9f160ff09ba494 (patch)
tree4db1a4e402d97dae295a0c6607726f0f192c0556 /libavcodec/avpacket.c
parent038c4f65ee6c72f9d1ee4d4e46c74073992fabc8 (diff)
parent7950e519bb094897f957b9a9531cc60ba46cbc91 (diff)
downloadffmpeg-streaming-20be5e0a0e7563671efe0f085c9f160ff09ba494.zip
ffmpeg-streaming-20be5e0a0e7563671efe0f085c9f160ff09ba494.tar.gz
Merge commit '7950e519bb094897f957b9a9531cc60ba46cbc91'
* commit '7950e519bb094897f957b9a9531cc60ba46cbc91': Disable deprecation warnings for cases where a replacement is available Conflicts: libavcodec/avpacket.c libavcodec/pthread.c libavcodec/utils.c libavdevice/v4l2.c libavfilter/avfiltergraph.c libavfilter/buffersrc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/avpacket.c')
-rw-r--r--libavcodec/avpacket.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index e276c60..faa42fe 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"
#include "bytestream.h"
@@ -63,7 +64,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;
@@ -88,7 +91,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;
@@ -123,7 +128,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;
@@ -146,7 +153,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;
@@ -194,7 +203,9 @@ static int copy_packet_data(AVPacket *pkt, AVPacket *src, int dup)
DUP_DATA(pkt->data, src->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 && dup)
pkt->side_data = src->side_data;
@@ -234,11 +245,13 @@ 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;
return copy_packet_data(pkt, &tmp_pkt, 1);
}
@@ -256,6 +269,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
@@ -263,6 +277,7 @@ void av_free_packet(AVPacket *pkt)
pkt->destruct(pkt);
pkt->destruct = NULL;
#endif
+FF_ENABLE_DEPRECATION_WARNINGS
pkt->data = NULL;
pkt->size = 0;
@@ -333,7 +348,9 @@ int av_packet_merge_side_data(AVPacket *pkt){
pkt->buf = buf;
pkt->data = p = buf->data;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->destruct = dummy_destruct_packet;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
pkt->size = size - FF_INPUT_BUFFER_PADDING_SIZE;
bytestream_put_buffer(&p, old.data, old.size);
OpenPOWER on IntegriCloud