diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index acdcec4251e5801f8635ce8bee9e742b68db8754..3f4271ae5fe0dbea129fd20fdbb550607f9aab1f 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1018,6 +1018,7 @@ void dump_format(AVFormatContext *ic,
                  const char *url,
                  int is_output);
 
+#if LIBAVFORMAT_VERSION_MAJOR < 53
 /**
  * Parses width and height out of string str.
  * @deprecated Use av_parse_video_frame_size instead.
@@ -1031,6 +1032,7 @@ attribute_deprecated int parse_image_size(int *width_ptr, int *height_ptr,
  */
 attribute_deprecated int parse_frame_rate(int *frame_rate, int *frame_rate_base,
                                           const char *arg);
+#endif
 
 /**
  * Parses \p datestr and returns a corresponding number of microseconds.
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 7a91b0f009031f9b30557cc7e11e60e31bf9ec07..80171ca9036da3dff811d6c3a28d0ee3582bf2eb 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2849,6 +2849,7 @@ void dump_format(AVFormatContext *ic,
         dump_stream_format(ic, i, index, is_output);
 }
 
+#if LIBAVFORMAT_VERSION_MAJOR < 53
 int parse_image_size(int *width_ptr, int *height_ptr, const char *str)
 {
     return av_parse_video_frame_size(width_ptr, height_ptr, str);
@@ -2862,6 +2863,7 @@ int parse_frame_rate(int *frame_rate_num, int *frame_rate_den, const char *arg)
     *frame_rate_den= frame_rate.den;
     return ret;
 }
+#endif
 
 int64_t av_gettime(void)
 {