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/utils.c | |
parent | 3a7050ffed5ce061b114a11e4de4b77aba8efa0b (diff) | |
download | ffmpeg-7950e519bb094897f957b9a9531cc60ba46cbc91.tar.gz |
Disable deprecation warnings for cases where a replacement is available
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index ee0b571f45..13419c7936 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -32,6 +32,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" @@ -511,7 +512,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) { @@ -525,6 +528,7 @@ int avcodec_default_get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags } #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); @@ -548,6 +552,7 @@ static void compat_release_buffer(void *opaque, uint8_t *data) AVBufferRef *buf = opaque; av_buffer_unref(&buf); } +FF_ENABLE_DEPRECATION_WARNINGS #endif int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags) @@ -601,6 +606,7 @@ int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags) frame->reordered_opaque = avctx->reordered_opaque; #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 @@ -712,6 +718,7 @@ fail: av_buffer_unref(&dummy_buf); return ret; } +FF_ENABLE_DEPRECATION_WARNINGS #endif ret = avctx->get_buffer2(avctx, frame, flags); @@ -1095,7 +1102,9 @@ int ff_alloc_packet(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) @@ -1103,7 +1112,9 @@ int ff_alloc_packet(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; @@ -2042,6 +2053,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 Libav " @@ -2066,6 +2078,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; |