1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Michael Niedermayer 2013-08-03 10:08:30 +02:00
commit 20be5e0a0e
20 changed files with 99 additions and 1 deletions

View File

@ -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);

View File

@ -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"
@ -331,11 +332,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) {
@ -348,6 +351,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;
@ -357,6 +361,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) {

View File

@ -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"
@ -461,6 +462,7 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
s->max_matrix_channel = max_matrix_channel;
#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) {
@ -470,6 +472,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) {

View File

@ -25,6 +25,7 @@
#include <float.h>
#include <limits.h>
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "version.h"
@ -40,6 +41,7 @@
#define AV_CODEC_DEFAULT_BITRATE 200*1000
FF_DISABLE_DEPRECATION_WARNINGS
static const AVOption avcodec_options[] = {
{"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = AV_CODEC_DEFAULT_BITRATE }, 0, INT_MAX, A|V|E},
{"ab", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = 128*1000 }, 0, INT_MAX, A|E},
@ -382,6 +384,7 @@ static const AVOption avcodec_options[] = {
{"refcounted_frames", NULL, OFFSET(refcounted_frames), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, A|V|D },
{NULL},
};
FF_ENABLE_DEPRECATION_WARNINGS
#undef A
#undef V

View File

@ -37,6 +37,7 @@
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/cpu.h"
#include "libavutil/internal.h"
#if HAVE_PTHREADS
#include <pthread.h>
@ -436,8 +437,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;
@ -541,12 +544,14 @@ 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 && (
p->avctx->get_format != avcodec_default_get_format ||
#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) {
int call_done = 1;
pthread_mutex_lock(&p->progress_mutex);
@ -947,11 +952,13 @@ static int thread_get_buffer_internal(AVCodecContext *avctx, ThreadFrame *f, int
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 {
pthread_mutex_lock(&p->progress_mutex);
@ -1018,6 +1025,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 ||
(
@ -1025,6 +1033,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;

View File

@ -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;

View File

@ -551,7 +551,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));

View File

@ -26,6 +26,7 @@
#include "libavutil/common.h"
#include "libavutil/eval.h"
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/rational.h"
@ -623,8 +624,10 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name)
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
return ret;

View File

@ -28,6 +28,7 @@
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavcodec/avcodec.h" // avcodec_find_best_pix_fmt_of_2()
@ -136,7 +137,9 @@ int avfilter_graph_add_filter(AVFilterGraph *graph, AVFilterContext *filter)
graph->filters[graph->nb_filters++] = filter;
#if FF_API_FOO_COUNT
FF_DISABLE_DEPRECATION_WARNINGS
graph->filter_count_unused = graph->nb_filters;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
filter->graph = graph;
@ -201,7 +204,9 @@ AVFilterContext *avfilter_graph_alloc_filter(AVFilterGraph *graph,
graph->filters[graph->nb_filters++] = s;
#if FF_API_FOO_COUNT
FF_DISABLE_DEPRECATION_WARNINGS
graph->filter_count_unused = graph->nb_filters;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
s->graph = graph;

View File

@ -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 "libavutil/opt.h"
@ -263,6 +264,7 @@ void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size)
}
#if FF_API_AVFILTERBUFFER
FF_DISABLE_DEPRECATION_WARNINGS
static void compat_free_buffer(AVFilterBuffer *buf)
{
AVFrame *frame = buf->priv;
@ -347,6 +349,7 @@ int attribute_align_arg av_buffersink_get_buffer_ref(AVFilterContext *ctx,
return compat_read(ctx, bufref, 0, flags);
}
FF_ENABLE_DEPRECATION_WARNINGS
#endif
AVRational av_buffersink_get_frame_rate(AVFilterContext *ctx)

View File

@ -30,6 +30,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"
@ -173,6 +174,7 @@ static int av_buffersrc_add_frame_internal(AVFilterContext *ctx,
}
#if FF_API_AVFILTERBUFFER
FF_DISABLE_DEPRECATION_WARNINGS
static void compat_free_buffer(void *opaque, uint8_t *data)
{
AVFilterBufferRef *buf = opaque;
@ -283,6 +285,7 @@ fail:
return ret;
}
FF_ENABLE_DEPRECATION_WARNINGS
int av_buffersrc_buffer(AVFilterContext *ctx, AVFilterBufferRef *buf)
{

View File

@ -24,6 +24,7 @@
* internal API functions
*/
#include "libavutil/internal.h"
#include "avfilter.h"
#include "avfiltergraph.h"
#include "formats.h"
@ -272,7 +273,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
}
@ -283,7 +286,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
}

View File

@ -25,6 +25,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"
@ -1300,7 +1301,9 @@ static int asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt)
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;

View File

@ -24,6 +24,7 @@
#include "libavutil/bswap.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "avformat.h"
@ -1268,12 +1269,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, pkt->pos);
#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;

View File

@ -32,6 +32,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"
@ -585,7 +586,9 @@ int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt,
return AVERROR(ENOMEM);
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-allocated memory

View File

@ -20,6 +20,7 @@
*/
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavcodec/mjpeg.h"
#include "avformat.h"
@ -171,7 +172,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;
@ -212,7 +215,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;

View File

@ -30,6 +30,7 @@
*/
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "internal.h"
@ -237,7 +238,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;
}

View File

@ -22,6 +22,7 @@
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
#include "avformat.h"
@ -740,7 +741,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,

View File

@ -28,6 +28,7 @@
#include "libavutil/avassert.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
#include "libavutil/internal.h"
#include "libavutil/pixdesc.h"
#include "metadata.h"
#include "id3v2.h"
@ -1241,8 +1242,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)

View File

@ -26,7 +26,7 @@
#include "common.h"
#include "pixfmt.h"
#include "pixdesc.h"
#include "internal.h"
#include "intreadwrite.h"
#include "avstring.h"
@ -1737,6 +1737,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;
@ -1854,6 +1855,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)