---
 libavcodec/avpacket.c    |   15 +++++++++++++++
 libavcodec/mlp_parser.c  |    5 +++++
 libavcodec/mlpdec.c      |    3 +++
 libavcodec/pthread.c     |    9 +++++++++
 libavcodec/utils.c       |   13 +++++++++++++
 libavdevice/v4l2.c       |    3 +++
 libavfilter/avfilter.c   |    3 +++
 libavfilter/buffersink.c |    3 +++
 libavfilter/buffersrc.c  |    3 +++
 libavfilter/internal.h   |    5 +++++
 libavformat/asfdec.c     |    3 +++
 libavformat/avidec.c     |    5 +++++
 libavformat/mux.c        |    3 +++
 libavformat/mxg.c        |    5 +++++
 libavformat/psxstr.c     |    3 +++
 libavformat/rmdec.c      |    3 +++
 libavformat/utils.c      |    3 +++
 libavutil/pixdesc.c      |    4 +++-
 18 files changed, 90 insertions(+), 1 deletion(-)

diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index df88f3f..2fc8bc0 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;
 
diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index 7f6739f..1a68014 100644
--- a/libavcodec/mlp_parser.c
+++ b/libavcodec/mlp_parser.c
@@ -28,6 +28,7 @@
 
 #include "libavutil/channel_layout.h"
 #include "libavutil/crc.h"
+#include "libavutil/internal.h"
 #include "get_bits.h"
 #include "parser.h"
 #include "mlp_parser.h"
@@ -323,11 +324,13 @@ static int mlp_parse(AVCodecParserContext *s,
         if (mh.stream_type == 0xbb) {
             /* MLP stream */
 #if FF_API_REQUEST_CHANNELS
+FF_DISABLE_DEPRECATION_WARNINGS
             if (avctx->request_channels > 0 && avctx->request_channels <= 2 &&
                 mh.num_substreams > 1) {
                 avctx->channels       = 2;
                 avctx->channel_layout = AV_CH_LAYOUT_STEREO;
             } else
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
             if (avctx->request_channel_layout == AV_CH_LAYOUT_STEREO &&
                 mh.num_substreams > 1) {
@@ -340,6 +343,7 @@ static int mlp_parse(AVCodecParserContext *s,
         } else { /* mh.stream_type == 0xba */
             /* TrueHD stream */
 #if FF_API_REQUEST_CHANNELS
+FF_DISABLE_DEPRECATION_WARNINGS
             if (avctx->request_channels > 0 && avctx->request_channels <= 2 &&
                 mh.num_substreams > 1) {
                 avctx->channels       = 2;
@@ -349,6 +353,7 @@ static int mlp_parse(AVCodecParserContext *s,
                 avctx->channels       = mh.channels_thd_stream1;
                 avctx->channel_layout = mh.channel_layout_thd_stream1;
             } else
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
             if (avctx->request_channel_layout == AV_CH_LAYOUT_STEREO &&
                 mh.num_substreams > 1) {
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 5797700..e9b8f67 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -27,6 +27,7 @@
 #include <stdint.h>
 
 #include "avcodec.h"
+#include "libavutil/internal.h"
 #include "libavutil/intreadwrite.h"
 #include "libavutil/channel_layout.h"
 #include "get_bits.h"
@@ -444,6 +445,7 @@ static int read_restart_header(MLPDecodeContext *m, 
GetBitContext *gbp,
     }
 
 #if FF_API_REQUEST_CHANNELS
+FF_DISABLE_DEPRECATION_WARNINGS
     if (m->avctx->request_channels > 0 &&
         m->avctx->request_channels <= s->max_channel + 1 &&
         m->max_decoded_substream > substr) {
@@ -453,6 +455,7 @@ static int read_restart_header(MLPDecodeContext *m, 
GetBitContext *gbp,
                s->max_channel + 1, substr);
         m->max_decoded_substream = substr;
     } else
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
     if (m->avctx->request_channel_layout == s->ch_layout &&
         m->max_decoded_substream > substr) {
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 404804d..fd0af42 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -54,6 +54,7 @@
 #include "thread.h"
 #include "libavutil/avassert.h"
 #include "libavutil/common.h"
+#include "libavutil/internal.h"
 
 #if HAVE_PTHREADS
 #include <pthread.h>
@@ -458,8 +459,10 @@ static int update_context_from_user(AVCodecContext *dst, 
AVCodecContext *src)
     dst->draw_horiz_band= src->draw_horiz_band;
     dst->get_buffer2    = src->get_buffer2;
 #if FF_API_GET_BUFFER
+FF_DISABLE_DEPRECATION_WARNINGS
     dst->get_buffer     = src->get_buffer;
     dst->release_buffer = src->release_buffer;
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
 
     dst->opaque   = src->opaque;
@@ -561,11 +564,13 @@ static int submit_packet(PerThreadContext *p, AVPacket 
*avpkt)
      * and it calls back to the client here.
      */
 
+FF_DISABLE_DEPRECATION_WARNINGS
     if (!p->avctx->thread_safe_callbacks && (
 #if FF_API_GET_BUFFER
          p->avctx->get_buffer ||
 #endif
          p->avctx->get_buffer2 != avcodec_default_get_buffer2)) {
+FF_ENABLE_DEPRECATION_WARNINGS
         while (p->state != STATE_SETUP_FINISHED && p->state != 
STATE_INPUT_READY) {
             pthread_mutex_lock(&p->progress_mutex);
             while (p->state == STATE_SETTING_UP)
@@ -927,11 +932,13 @@ int ff_thread_get_buffer(AVCodecContext *avctx, 
ThreadFrame *f, int flags)
     }
 
     pthread_mutex_lock(&p->parent->buffer_mutex);
+FF_DISABLE_DEPRECATION_WARNINGS
     if (avctx->thread_safe_callbacks || (
 #if FF_API_GET_BUFFER
         !avctx->get_buffer &&
 #endif
         avctx->get_buffer2 == avcodec_default_get_buffer2)) {
+FF_ENABLE_DEPRECATION_WARNINGS
         err = ff_get_buffer(avctx, f->f, flags);
     } else {
         p->requested_frame = f->f;
@@ -964,6 +971,7 @@ void ff_thread_release_buffer(AVCodecContext *avctx, 
ThreadFrame *f)
     PerThreadContext *p = avctx->thread_opaque;
     FrameThreadContext *fctx;
     AVFrame *dst, *tmp;
+FF_DISABLE_DEPRECATION_WARNINGS
     int can_direct_free = !(avctx->active_thread_type & FF_THREAD_FRAME) ||
                           avctx->thread_safe_callbacks                   ||
                           (
@@ -971,6 +979,7 @@ void ff_thread_release_buffer(AVCodecContext *avctx, 
ThreadFrame *f)
                            !avctx->get_buffer &&
 #endif
                            avctx->get_buffer2 == avcodec_default_get_buffer2);
+FF_ENABLE_DEPRECATION_WARNINGS
 
     if (!f->f->data[0])
         return;
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 2b63759..586033b 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -31,6 +31,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"
@@ -509,7 +510,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) {
@@ -523,6 +526,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);
@@ -546,6 +550,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
@@ -709,6 +715,7 @@ fail:
         av_buffer_unref(&dummy_buf);
         return ret;
     }
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
 
     return avctx->get_buffer2(avctx, frame, flags);
@@ -1084,7 +1091,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)
@@ -1092,7 +1101,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;
@@ -2038,6 +2049,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 "
@@ -2062,6 +2074,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;
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 9e5aa5e..848d84a 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -45,6 +45,7 @@
 #include "libavutil/atomic.h"
 #include "libavutil/avassert.h"
 #include "libavutil/imgutils.h"
+#include "libavutil/internal.h"
 #include "libavutil/log.h"
 #include "libavutil/opt.h"
 #include "libavutil/parseutils.h"
@@ -506,7 +507,9 @@ static int mmap_read_frame(AVFormatContext *ctx, AVPacket 
*pkt)
         pkt->data     = s->buf_start[buf.index];
         pkt->size     = buf.bytesused;
 #if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
         pkt->destruct = dummy_release_buffer;
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
 
         buf_descriptor = av_malloc(sizeof(struct buff_data));
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 4985ce9..cf9d479 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -24,6 +24,7 @@
 #include "libavutil/channel_layout.h"
 #include "libavutil/common.h"
 #include "libavutil/imgutils.h"
+#include "libavutil/internal.h"
 #include "libavutil/pixdesc.h"
 #include "libavutil/rational.h"
 #include "libavutil/samplefmt.h"
@@ -368,8 +369,10 @@ int avfilter_open(AVFilterContext **filter_ctx, AVFilter 
*filter, const char *in
             goto err;
     }
 #if FF_API_FOO_COUNT
+FF_DISABLE_DEPRECATION_WARNINGS
     ret->output_count = ret->nb_outputs;
     ret->input_count  = ret->nb_inputs;
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
 
     *filter_ctx = ret;
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 6f75291..d383a12 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -27,6 +27,7 @@
 #include "libavutil/avassert.h"
 #include "libavutil/channel_layout.h"
 #include "libavutil/common.h"
+#include "libavutil/internal.h"
 #include "libavutil/mathematics.h"
 
 #include "audio.h"
@@ -137,6 +138,7 @@ int av_buffersink_get_samples(AVFilterContext *ctx, AVFrame 
*frame, int nb_sampl
 }
 
 #if FF_API_AVFILTERBUFFER
+FF_DISABLE_DEPRECATION_WARNINGS
 static void compat_free_buffer(AVFilterBuffer *buf)
 {
     AVFrame *frame = buf->priv;
@@ -205,6 +207,7 @@ int av_buffersink_read_samples(AVFilterContext *ctx, 
AVFilterBufferRef **buf,
 {
     return compat_read(ctx, buf, nb_samples);
 }
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
 
 static const AVFilterPad avfilter_vsink_buffer_inputs[] = {
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index 2219ba5..42b5775 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -28,6 +28,7 @@
 #include "libavutil/fifo.h"
 #include "libavutil/frame.h"
 #include "libavutil/imgutils.h"
+#include "libavutil/internal.h"
 #include "libavutil/opt.h"
 #include "libavutil/samplefmt.h"
 #include "audio.h"
@@ -129,6 +130,7 @@ int av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame 
*frame)
 }
 
 #if FF_API_AVFILTERBUFFER
+FF_DISABLE_DEPRECATION_WARNINGS
 static void compat_free_buffer(void *opaque, uint8_t *data)
 {
     AVFilterBufferRef *buf = opaque;
@@ -231,6 +233,7 @@ fail:
 
     return ret;
 }
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
 
 static av_cold int init_video(AVFilterContext *ctx, const char *args)
diff --git a/libavfilter/internal.h b/libavfilter/internal.h
index 62eff72..7f6e2ff 100644
--- a/libavfilter/internal.h
+++ b/libavfilter/internal.h
@@ -24,6 +24,7 @@
  * internal API functions
  */
 
+#include "libavutil/internal.h"
 #include "avfilter.h"
 
 #if !FF_API_AVFILTERPAD_PUBLIC
@@ -151,7 +152,9 @@ static inline void ff_insert_inpad(AVFilterContext *f, 
unsigned index,
     ff_insert_pad(index, &f->nb_inputs, offsetof(AVFilterLink, dstpad),
                   &f->input_pads, &f->inputs, p);
 #if FF_API_FOO_COUNT
+FF_DISABLE_DEPRECATION_WARNINGS
     f->input_count = f->nb_inputs;
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
 }
 
@@ -162,7 +165,9 @@ static inline void ff_insert_outpad(AVFilterContext *f, 
unsigned index,
     ff_insert_pad(index, &f->nb_outputs, offsetof(AVFilterLink, srcpad),
                   &f->output_pads, &f->outputs, p);
 #if FF_API_FOO_COUNT
+FF_DISABLE_DEPRECATION_WARNINGS
     f->output_count = f->nb_outputs;
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
 }
 
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index a30bf1a..18a5cf0 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -27,6 +27,7 @@
 #include "libavutil/bswap.h"
 #include "libavutil/common.h"
 #include "libavutil/dict.h"
+#include "libavutil/internal.h"
 #include "libavutil/mathematics.h"
 #include "libavutil/opt.h"
 #include "avformat.h"
@@ -1260,7 +1261,9 @@ static int ff_asf_parse_packet(AVFormatContext *s, 
AVIOContext *pb, AVPacket *pk
             asf_st->frag_offset         = 0;
             *pkt                        = asf_st->pkt;
 #if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
             asf_st->pkt.destruct        = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
             asf_st->pkt.buf             = 0;
             asf_st->pkt.size            = 0;
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index b235875..a4bcda1 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -23,6 +23,7 @@
 #include "libavutil/mathematics.h"
 #include "libavutil/bswap.h"
 #include "libavutil/dict.h"
+#include "libavutil/internal.h"
 #include "libavutil/avstring.h"
 #include "avformat.h"
 #include "internal.h"
@@ -1085,12 +1086,16 @@ resync:
         if (CONFIG_DV_DEMUXER && avi->dv_demux) {
             AVBufferRef *avbuf = pkt->buf;
 #if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
             dstr = pkt->destruct;
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
             size = avpriv_dv_produce_packet(avi->dv_demux, pkt,
                                     pkt->data, pkt->size);
 #if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
             pkt->destruct = dstr;
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
             pkt->buf = avbuf;
             pkt->flags |= AV_PKT_FLAG_KEY;
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 76b0fb4..fd77c80 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -33,6 +33,7 @@
 #include "id3v2.h"
 #include "libavutil/avassert.h"
 #include "libavutil/avstring.h"
+#include "libavutil/internal.h"
 #include "libavutil/mathematics.h"
 #include "libavutil/parseutils.h"
 #include "libavutil/time.h"
@@ -421,7 +422,9 @@ void ff_interleave_add_packet(AVFormatContext *s, AVPacket 
*pkt,
     this_pktl      = av_mallocz(sizeof(AVPacketList));
     this_pktl->pkt = *pkt;
 #if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
     pkt->destruct  = NULL;           // do not free original but only the copy
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
     pkt->buf       = NULL;
     av_dup_packet(&this_pktl->pkt);  // duplicate the packet if it uses 
non-alloced memory
diff --git a/libavformat/mxg.c b/libavformat/mxg.c
index ea54fe2..1d1488c 100644
--- a/libavformat/mxg.c
+++ b/libavformat/mxg.c
@@ -20,6 +20,7 @@
  */
 
 #include "libavutil/channel_layout.h"
+#include "libavutil/internal.h"
 #include "libavutil/intreadwrite.h"
 #include "libavcodec/mjpeg.h"
 #include "avformat.h"
@@ -169,7 +170,9 @@ static int mxg_read_packet(AVFormatContext *s, AVPacket 
*pkt)
                 pkt->pts = pkt->dts = mxg->dts;
                 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->size = mxg->buffer_ptr - mxg->soi_ptr;
@@ -210,7 +213,9 @@ static int mxg_read_packet(AVFormatContext *s, AVPacket 
*pkt)
                     pkt->pts = pkt->dts = AV_RL64(startmarker_ptr + 8);
                     pkt->stream_index = 1;
 #if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
                     pkt->destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
                     pkt->buf  = NULL;
                     pkt->size = size - 14;
diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c
index 313a1d8..ba54768 100644
--- a/libavformat/psxstr.c
+++ b/libavformat/psxstr.c
@@ -30,6 +30,7 @@
  */
 
 #include "libavutil/channel_layout.h"
+#include "libavutil/internal.h"
 #include "libavutil/intreadwrite.h"
 #include "avformat.h"
 #include "internal.h"
@@ -203,7 +204,9 @@ static int str_read_packet(AVFormatContext *s,
                     pkt->size= -1;
                     pkt->buf = NULL;
 #if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
                     pkt->destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
                     return 0;
                 }
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 3dafa39..567ee8b 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -21,6 +21,7 @@
 
 #include "libavutil/avstring.h"
 #include "libavutil/channel_layout.h"
+#include "libavutil/internal.h"
 #include "libavutil/intreadwrite.h"
 #include "libavutil/dict.h"
 #include "avformat.h"
@@ -677,7 +678,9 @@ static int rm_assemble_video_frame(AVFormatContext *s, 
AVIOContext *pb,
         vst->pkt.size= 0;
         vst->pkt.buf = NULL;
 #if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
         vst->pkt.destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
         if(vst->slices != vst->cur_slice) //FIXME find out how to set slices 
correct from the begin
             memmove(pkt->data + 1 + 8*vst->cur_slice, pkt->data + 1 + 
8*vst->slices,
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 284d992..c29370b 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -28,6 +28,7 @@
 #include "libavcodec/bytestream.h"
 #include "libavutil/opt.h"
 #include "libavutil/dict.h"
+#include "libavutil/internal.h"
 #include "libavutil/pixdesc.h"
 #include "metadata.h"
 #include "id3v2.h"
@@ -1104,8 +1105,10 @@ static int parse_packet(AVFormatContext *s, AVPacket 
*pkt, int stream_index)
             out_pkt.buf   = pkt->buf;
             pkt->buf      = NULL;
 #if FF_API_DESTRUCT_PACKET
+FF_DISABLE_DEPRECATION_WARNINGS
             out_pkt.destruct = pkt->destruct;
             pkt->destruct = NULL;
+FF_ENABLE_DEPRECATION_WARNINGS
 #endif
         }
         if ((ret = av_dup_packet(&out_pkt)) < 0)
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index e1fa87e..14ee42f 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -25,7 +25,7 @@
 #include "common.h"
 #include "pixfmt.h"
 #include "pixdesc.h"
-
+#include "internal.h"
 #include "intreadwrite.h"
 
 void av_read_image_line(uint16_t *dst,
@@ -1367,6 +1367,7 @@ const AVPixFmtDescriptor 
av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
     },
 };
 
+FF_DISABLE_DEPRECATION_WARNINGS
 static enum AVPixelFormat get_pix_fmt_internal(const char *name)
 {
     enum AVPixelFormat pix_fmt;
@@ -1461,6 +1462,7 @@ enum AVPixelFormat av_pix_fmt_desc_get_id(const 
AVPixFmtDescriptor *desc)
 
     return desc - av_pix_fmt_descriptors;
 }
+FF_ENABLE_DEPRECATION_WARNINGS
 
 int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt,
                                      int *h_shift, int *v_shift)
-- 
1.7.9.5

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to