diff --git a/libavformat/utils.c b/libavformat/utils.c
index ea447c1fa7ee80c4400fe2b1f753b3cd88fabe7c..cb793435fb021e6c035da1ce650b00f08a174161 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -474,6 +474,9 @@ static const AVOption options[]={
 
 static const AVClass av_format_context_class = { "AVFormatContext", format_to_name, options };
 
+#if LIBAVCODEC_VERSION_INT > ((52<<16)+(0<<8)+0)
+static
+#endif
 void avformat_get_context_defaults(AVFormatContext *s){
     memset(s, 0, sizeof(AVFormatContext));