Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/avformat.h5
-rw-r--r--libavformat/utils.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 41063d64c3..0ab1156881 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -78,6 +78,9 @@
#ifndef FF_API_PARAMETERS_CODEC_ID
#define FF_API_PARAMETERS_CODEC_ID (LIBAVFORMAT_VERSION_MAJOR < 53)
#endif
+#ifndef FF_API_FIRST_FORMAT
+#define FF_API_FIRST_FORMAT (LIBAVFORMAT_VERSION_MAJOR < 53)
+#endif
/**
* I return the LIBAVFORMAT_VERSION_INT constant. You got
@@ -895,7 +898,7 @@ typedef struct AVPacketList {
struct AVPacketList *next;
} AVPacketList;
-#if LIBAVFORMAT_VERSION_INT < (53<<16)
+#if FF_API_FIRST_FORMAT
attribute_deprecated extern AVInputFormat *first_iformat;
attribute_deprecated extern AVOutputFormat *first_oformat;
#endif
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 56bcfc09b4..be475cce7e 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -110,8 +110,14 @@ static void av_frac_add(AVFrac *f, int64_t incr)
}
/** head of registered input format linked list */
+#if !FF_API_FIRST_FORMAT
+static
+#endif
AVInputFormat *first_iformat = NULL;
/** head of registered output format linked list */
+#if !FF_API_FIRST_FORMAT
+static
+#endif
AVOutputFormat *first_oformat = NULL;
AVInputFormat *av_iformat_next(AVInputFormat *f)