From 8ef30ac1f309fcf87c4df92e71c890f48cc199bb Mon Sep 17 00:00:00 2001
From: Aurelien Jacobs <aurel@gnuage.org>
Date: Fri, 15 Oct 2010 12:49:48 +0000
Subject: [PATCH] add FF_API_UDP_GET_FILE define to disable the deprecated
 udp_get_file_handle() public function

Originally committed as revision 25481 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavformat/avformat.h | 3 +++
 libavformat/avio.h     | 2 +-
 libavformat/udp.c      | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 89a4102fd17..d121b59e378 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -57,6 +57,9 @@
 #ifndef FF_API_GUESS_FORMAT
 #define FF_API_GUESS_FORMAT       (LIBAVFORMAT_VERSION_MAJOR < 53)
 #endif
+#ifndef FF_API_UDP_GET_FILE
+#define FF_API_UDP_GET_FILE       (LIBAVFORMAT_VERSION_MAJOR < 53)
+#endif
 
 /**
  * I return the LIBAVFORMAT_VERSION_INT constant.  You got
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 118b7f27c90..e4fd601724d 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -562,7 +562,7 @@ void init_checksum(ByteIOContext *s,
 /* udp.c */
 int udp_set_remote_url(URLContext *h, const char *uri);
 int udp_get_local_port(URLContext *h);
-#if (LIBAVFORMAT_VERSION_MAJOR <= 52)
+#if FF_API_UDP_GET_FILE
 int udp_get_file_handle(URLContext *h);
 #endif
 
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 2200c549ca8..b998086407e 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -276,7 +276,7 @@ int udp_get_local_port(URLContext *h)
  * streams at the same time.
  * @param h media file context
  */
-#if (LIBAVFORMAT_VERSION_MAJOR >= 53)
+#if !FF_API_UDP_GET_FILE
 static
 #endif
 int udp_get_file_handle(URLContext *h)
-- 
GitLab