diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-02-01 09:19:46 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-02-09 16:14:56 +0100 |
commit | 1cc24d749569a42510399a29b034f7a77bdec34e (patch) | |
tree | 15639c41a55248e04717abc00e949626f9e8e959 /libavcodec/avcodec.c | |
parent | ca18bb597223b3df5bbf8a1836d157ba58b62570 (diff) | |
download | ffmpeg-1cc24d749569a42510399a29b034f7a77bdec34e.tar.gz |
lavc: deprecate avcodec_close()
Its use has been discouraged since 2016, but now is no longer used in
avformat, so there is no reason to keep it public.
Diffstat (limited to 'libavcodec/avcodec.c')
-rw-r--r-- | libavcodec/avcodec.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index a6c8629f6c..b6d27ada21 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -377,7 +377,7 @@ end: return ret; free_and_end: - avcodec_close(avctx); + ff_codec_close(avctx); goto end; } @@ -432,12 +432,12 @@ void avsubtitle_free(AVSubtitle *sub) memset(sub, 0, sizeof(*sub)); } -av_cold int avcodec_close(AVCodecContext *avctx) +av_cold void ff_codec_close(AVCodecContext *avctx) { int i; if (!avctx) - return 0; + return; if (avcodec_is_open(avctx)) { AVCodecInternal *avci = avctx->internal; @@ -497,9 +497,15 @@ av_cold int avcodec_close(AVCodecContext *avctx) avctx->codec = NULL; avctx->active_thread_type = 0; +} +#if FF_API_AVCODEC_CLOSE +int avcodec_close(AVCodecContext *avctx) +{ + ff_codec_close(avctx); return 0; } +#endif static const char *unknown_if_null(const char *str) { |