# HG changeset patch # User aurel # Date 1282252892 0 # Node ID 896acb967d32b745bc33d749dc61101dcd2a4db0 # Parent 98bbeb6188e54d70039957175fabac831cf6bab9 add FF_API_REGISTER_PROTOCOL define to disable the deprecated register_protocol() function diff -r 98bbeb6188e5 -r 896acb967d32 avformat.h --- a/avformat.h Thu Aug 19 17:07:12 2010 +0000 +++ b/avformat.h Thu Aug 19 21:21:32 2010 +0000 @@ -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 -r 98bbeb6188e5 -r 896acb967d32 avio.c --- a/avio.c Thu Aug 19 17:07:12 2010 +0000 +++ b/avio.c Thu Aug 19 21:21:32 2010 +0000 @@ -71,7 +71,7 @@ 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 -r 98bbeb6188e5 -r 896acb967d32 avio.h --- a/avio.h Thu Aug 19 17:07:12 2010 +0000 +++ b/avio.h Thu Aug 19 21:21:32 2010 +0000 @@ -256,7 +256,7 @@ 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 @@ */ URLProtocol *av_protocol_next(URLProtocol *p); -#if LIBAVFORMAT_VERSION_MAJOR < 53 +#if FF_API_REGISTER_PROTOCOL /** * @deprecated Use av_register_protocol() instead. */