summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/avformat.h5
-rw-r--r--libavformat/utils.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 0354f03a47..940fc654cc 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -66,6 +66,9 @@
#ifndef FF_API_ALLOC_FORMAT_CONTEXT
#define FF_API_ALLOC_FORMAT_CONTEXT (LIBAVFORMAT_VERSION_MAJOR < 53)
#endif
+#ifndef FF_API_PARSE_FRAME_PARAM
+#define FF_API_PARSE_FRAME_PARAM (LIBAVFORMAT_VERSION_MAJOR < 53)
+#endif
/**
* I return the LIBAVFORMAT_VERSION_INT constant. You got
@@ -1425,7 +1428,7 @@ void dump_format(AVFormatContext *ic,
const char *url,
int is_output);
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if FF_API_PARSE_FRAME_PARAM
/**
* Parse width and height out of string str.
* @deprecated Use av_parse_video_frame_size instead.
diff --git a/libavformat/utils.c b/libavformat/utils.c
index ebcb7d7e45..56bcfc09b4 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3207,7 +3207,7 @@ void dump_format(AVFormatContext *ic,
av_free(printed);
}
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if FF_API_PARSE_FRAME_PARAM
#include "libavcore/parseutils.h"
int parse_image_size(int *width_ptr, int *height_ptr, const char *str)