avcodec_close() is declared in an installed header, where av_cold cannot be used
as it is defined in a non-installed header.  Since the compiler requires the
av_cold attribute to be available during compilation of code that calls
avcodec_close(), i.e. present in the header declaring avcodec_close(), adding
av_cold just to the function definition and not the declaration in the header
is pointless.
---
 libavcodec/utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index aa0f5b6..abf733f 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1344,7 +1344,7 @@ void avsubtitle_free(AVSubtitle *sub)
     memset(sub, 0, sizeof(AVSubtitle));
 }
 
-av_cold int avcodec_close(AVCodecContext *avctx)
+int avcodec_close(AVCodecContext *avctx)
 {
     /* If there is a user-supplied mutex locking routine, call it. */
     if (ff_lockmgr_cb) {
-- 
1.7.1

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

Reply via email to