From 5f30ac27795f9f98043e8582ccaad8813104adc4 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 21 May 2016 11:46:44 +0200 Subject: lavc: deprecate avcodec_copy_context() Since AVCodecContext contains a lot of complex state, copying a codec context is not a well-defined operation. The purpose for which it is typically used (which is well-defined) is copying the stream parameters from one codec context to another. That is now possible with through the AVCodecParameters API. Therefore, there is no reason for avcodec_copy_context() to exist. --- libavcodec/options.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec/options.c') diff --git a/libavcodec/options.c b/libavcodec/options.c index 49c8aea030..50bacd3df8 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -155,6 +155,7 @@ void avcodec_free_context(AVCodecContext **pavctx) av_freep(pavctx); } +#if FF_API_COPY_CONTEXT int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src) { const AVCodec *orig_codec = dest->codec; @@ -225,6 +226,7 @@ fail: #endif return AVERROR(ENOMEM); } +#endif const AVClass *avcodec_get_class(void) { -- cgit v1.2.3