aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.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/utils.c
parent038c4f65ee6c72f9d1ee4d4e46c74073992fabc8 (diff)
parent7950e519bb094897f957b9a9531cc60ba46cbc91 (diff)
downloadffmpeg-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/utils.c')
-rw-r--r--libavcodec/utils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 8464c3b8dc..fd08becc75 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -34,6 +34,7 @@
#include "libavutil/channel_layout.h"
#include "libavutil/crc.h"
#include "libavutil/frame.h"
+#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
@@ -630,7 +631,9 @@ int avcodec_default_get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags
return ret;
#if FF_API_GET_BUFFER
+FF_DISABLE_DEPRECATION_WARNINGS
frame->type = FF_BUFFER_TYPE_INTERNAL;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
switch (avctx->codec_type) {
@@ -701,6 +704,7 @@ int ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame)
}
#if FF_API_GET_BUFFER
+FF_DISABLE_DEPRECATION_WARNINGS
int avcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame)
{
return avcodec_default_get_buffer2(avctx, frame, 0);
@@ -724,6 +728,7 @@ static void compat_release_buffer(void *opaque, uint8_t *data)
AVBufferRef *buf = opaque;
av_buffer_unref(&buf);
}
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
static int get_buffer_internal(AVCodecContext *avctx, AVFrame *frame, int flags)
@@ -740,6 +745,7 @@ static int get_buffer_internal(AVCodecContext *avctx, AVFrame *frame, int flags)
return ret;
#if FF_API_GET_BUFFER
+FF_DISABLE_DEPRECATION_WARNINGS
/*
* Wrap an old get_buffer()-allocated buffer in an bunch of AVBuffers.
* We wrap each plane in its own AVBuffer. Each of those has a reference to
@@ -852,6 +858,7 @@ fail:
av_buffer_unref(&dummy_buf);
return ret;
}
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
ret = avctx->get_buffer2(avctx, frame, flags);
@@ -1446,7 +1453,9 @@ int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int size)
if (avpkt->data) {
AVBufferRef *buf = avpkt->buf;
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
void *destruct = avpkt->destruct;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
if (avpkt->size < size) {
@@ -1456,7 +1465,9 @@ int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int size)
av_init_packet(avpkt);
#if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
avpkt->destruct = destruct;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
avpkt->buf = buf;
avpkt->size = size;
@@ -2998,6 +3009,7 @@ int ff_match_2uint16(const uint16_t(*tab)[2], int size, int a, int b)
}
#if FF_API_MISSING_SAMPLE
+FF_DISABLE_DEPRECATION_WARNINGS
void av_log_missing_feature(void *avc, const char *feature, int want_sample)
{
av_log(avc, AV_LOG_WARNING, "%s is not implemented. Update your FFmpeg "
@@ -3022,6 +3034,7 @@ void av_log_ask_for_sample(void *avc, const char *msg, ...)
va_end(argument_list);
}
+FF_ENABLE_DEPRECATION_WARNINGS
#endif /* FF_API_MISSING_SAMPLE */
static AVHWAccel *first_hwaccel = NULL;