diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 78054debca3ac528adcd1a09fb9f0790b5c0479f..bab412ff64f2a75f17bbaeaf5ede95c51f5e1286 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1874,16 +1874,6 @@ AVProgram *av_new_program(AVFormatContext *s, int id);
  */
 
 
-#if FF_API_ALLOC_OUTPUT_CONTEXT
-/**
- * @deprecated deprecated in favor of avformat_alloc_output_context2()
- */
-attribute_deprecated
-AVFormatContext *avformat_alloc_output_context(const char *format,
-                                               AVOutputFormat *oformat,
-                                               const char *filename);
-#endif
-
 /**
  * Allocate an AVFormatContext for an output format.
  * avformat_free_context() can be used to free the context and
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 55add43ebb8da5bd1971047ff6c6a8ca988ba332..21e6a077237089f2a54e19e570dae8c351efe7e4 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -171,16 +171,6 @@ error:
     return ret;
 }
 
-#if FF_API_ALLOC_OUTPUT_CONTEXT
-AVFormatContext *avformat_alloc_output_context(const char *format,
-                                               AVOutputFormat *oformat, const char *filename)
-{
-    AVFormatContext *avctx;
-    int ret = avformat_alloc_output_context2(&avctx, oformat, format, filename);
-    return ret < 0 ? NULL : avctx;
-}
-#endif
-
 static int validate_codec_tag(AVFormatContext *s, AVStream *st)
 {
     const AVCodecTag *avctag;
diff --git a/libavformat/version.h b/libavformat/version.h
index 90739a87596d16de3a3806ee463070032b38c8a9..28cd008f2051a1bfdd8a7f658d1b42ebdf958953 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -61,9 +61,6 @@
 #define FF_API_URL_FEOF                 (LIBAVFORMAT_VERSION_MAJOR < 57)
 #endif
 
-#ifndef FF_API_ALLOC_OUTPUT_CONTEXT
-#define FF_API_ALLOC_OUTPUT_CONTEXT    (LIBAVFORMAT_VERSION_MAJOR < 56)
-#endif
 #ifndef FF_API_FORMAT_PARAMETERS
 #define FF_API_FORMAT_PARAMETERS       (LIBAVFORMAT_VERSION_MAJOR < 56)
 #endif