[FFmpeg-cvslog] r24840 - in trunk/libavformat: avformat.h avio.c avio.h
aurel
subversion
Thu Aug 19 23:21:32 CEST 2010
Author: aurel
Date: Thu Aug 19 23:21:32 2010
New Revision: 24840
Log:
add FF_API_REGISTER_PROTOCOL define to disable the deprecated
register_protocol() function
Modified:
trunk/libavformat/avformat.h
trunk/libavformat/avio.c
trunk/libavformat/avio.h
Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h Thu Aug 19 19:07:12 2010 (r24839)
+++ trunk/libavformat/avformat.h Thu Aug 19 23:21:32 2010 (r24840)
@@ -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
Modified: trunk/libavformat/avio.c
==============================================================================
--- trunk/libavformat/avio.c Thu Aug 19 19:07:12 2010 (r24839)
+++ trunk/libavformat/avio.c Thu Aug 19 23:21:32 2010 (r24840)
@@ -71,7 +71,7 @@ int av_register_protocol2(URLProtocol *p
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;
Modified: trunk/libavformat/avio.h
==============================================================================
--- trunk/libavformat/avio.h Thu Aug 19 19:07:12 2010 (r24839)
+++ trunk/libavformat/avio.h Thu Aug 19 23:21:32 2010 (r24840)
@@ -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.
*/
More information about the ffmpeg-cvslog
mailing list