[SCM] libav/experimental: add FF_API_REGISTER_PROTOCOL define to disable the deprecated register_protocol() function
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:14:16 UTC 2013
The following commit has been merged in the experimental branch:
commit 838b27b42c1838857e6b2ad47b4a932717108c10
Author: Aurelien Jacobs <aurel at gnuage.org>
Date: Thu Aug 19 21:21:32 2010 +0000
add FF_API_REGISTER_PROTOCOL define to disable the deprecated
register_protocol() function
Originally committed as revision 24840 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index f49c842..d61e293 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -48,6 +48,9 @@
#ifndef FF_API_URL_CLASS
#define FF_API_URL_CLASS (LIBAVFORMAT_VERSION_MAJOR >= 53)
#endif
+#ifndef FF_API_REGISTER_PROTOCOL
+#define FF_API_REGISTER_PROTOCOL (LIBAVFORMAT_VERSION_MAJOR < 53)
+#endif
/**
* I return the LIBAVFORMAT_VERSION_INT constant. You got
diff --git a/libavformat/avio.c b/libavformat/avio.c
index f19cb29..9d50b48 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -71,7 +71,7 @@ int av_register_protocol2(URLProtocol *protocol, int size)
return 0;
}
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if FF_API_REGISTER_PROTOCOL
/* The layout of URLProtocol as of when major was bumped to 52 */
struct URLProtocol_compat {
const char *name;
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 2b7a9c5..8c5f94a 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -256,7 +256,7 @@ typedef struct URLProtocol {
const AVClass *priv_data_class;
} URLProtocol;
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if FF_API_REGISTER_PROTOCOL
extern URLProtocol *first_protocol;
#endif
@@ -269,7 +269,7 @@ extern URLInterruptCB *url_interrupt_cb;
*/
URLProtocol *av_protocol_next(URLProtocol *p);
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if FF_API_REGISTER_PROTOCOL
/**
* @deprecated Use av_register_protocol() instead.
*/
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list