diff options
author | Dale Curtis <dalecurtis@chromium.org> | 2014-05-20 12:03:56 -0700 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-20 22:55:28 +0200 |
commit | ca2fd25988d3789bf84d29713e1c505127101ffa (patch) | |
tree | 024eeed0f74beb7a1cc7c8614226c5ad2e9c6bff /libavcodec/utils.c | |
parent | be656c362d43bc4aa99366dab2d7414fe008f3d6 (diff) | |
download | ffmpeg-ca2fd25988d3789bf84d29713e1c505127101ffa.tar.gz |
Fix compilation errors when deprecated features are disabled.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index d3cf40813e..b09126cfa9 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1640,7 +1640,11 @@ int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int64_t size) av_fast_padded_malloc(&avctx->internal->byte_buffer, &avctx->internal->byte_buffer_size, size); avpkt->data = avctx->internal->byte_buffer; avpkt->size = avctx->internal->byte_buffer_size; +#if FF_API_DESTRUCT_PACKET +FF_DISABLE_DEPRECATION_WARNINGS avpkt->destruct = NULL; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } } @@ -1812,7 +1816,11 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, } avpkt->buf = user_pkt.buf; avpkt->data = user_pkt.data; +#if FF_API_DESTRUCT_PACKET +FF_DISABLE_DEPRECATION_WARNINGS avpkt->destruct = user_pkt.destruct; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else { if (av_dup_packet(avpkt) < 0) { ret = AVERROR(ENOMEM); @@ -2013,7 +2021,11 @@ int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx, } avpkt->buf = user_pkt.buf; avpkt->data = user_pkt.data; +#if FF_API_DESTRUCT_PACKET +FF_DISABLE_DEPRECATION_WARNINGS avpkt->destruct = user_pkt.destruct; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } else { if (av_dup_packet(avpkt) < 0) { ret = AVERROR(ENOMEM); |