Originally committed as revision 24835 to svn://svn.ffmpeg.org/ffmpeg/trunk
#ifndef FF_API_OLD_METADATA
#define FF_API_OLD_METADATA (LIBAVFORMAT_VERSION_MAJOR < 53)
#endif
+#ifndef FF_API_URL_CLASS
+#define FF_API_URL_CLASS (LIBAVFORMAT_VERSION_MAJOR >= 53)
+#endif
/**
* I return the LIBAVFORMAT_VERSION_INT constant. You got
#include "network.h"
#endif
-#if LIBAVFORMAT_VERSION_MAJOR >= 53
+#if FF_API_URL_CLASS
/** @name Logging context. */
/*@{*/
static const char *urlcontext_to_name(void *ptr)
err = AVERROR(ENOMEM);
goto fail;
}
-#if LIBAVFORMAT_VERSION_MAJOR >= 53
+#if FF_API_URL_CLASS
uc->av_class = &urlcontext_class;
#endif
uc->filename = (char *) &uc[1];
* sizeof(URLContext) must not be used outside libav*.
*/
typedef struct URLContext {
-#if LIBAVFORMAT_VERSION_MAJOR >= 53
+#if FF_API_URL_CLASS
const AVClass *av_class; ///< information for av_log(). Set by url_open().
#endif
struct URLProtocol *prot;