lavc: make avcodec_init() static on next bump.

It's called from avcodec_register() anyway, so there's no reason for it
to be public.
This commit is contained in:
Anton Khirnov 2011-08-10 09:50:00 +02:00
parent d1d33e0763
commit 7221139ba0
3 changed files with 15 additions and 8 deletions

View File

@ -3482,21 +3482,22 @@ const char *avcodec_configuration(void);
*/ */
const char *avcodec_license(void); const char *avcodec_license(void);
#if FF_API_AVCODEC_INIT
/** /**
* Initialize libavcodec. * @deprecated this function is called automatically from avcodec_register()
* If called more than once, does nothing. * and avcodec_register_all(), there is no need to call it manually
*
* @warning This function must be called before any other libavcodec
* function.
*
* @warning This function is not thread-safe.
*/ */
attribute_deprecated
void avcodec_init(void); void avcodec_init(void);
#endif
/** /**
* Register the codec codec and initialize libavcodec. * Register the codec codec and initialize libavcodec.
* *
* @see avcodec_init(), avcodec_register_all() * @warning either this function or avcodec_register_all() must be called
* before any other libavcodec functions.
*
* @see avcodec_register_all()
*/ */
void avcodec_register(AVCodec *codec); void avcodec_register(AVCodec *codec);

View File

@ -1065,6 +1065,9 @@ const char *avcodec_license(void)
return LICENSE_PREFIX LIBAV_LICENSE + sizeof(LICENSE_PREFIX) - 1; return LICENSE_PREFIX LIBAV_LICENSE + sizeof(LICENSE_PREFIX) - 1;
} }
#if !FF_API_AVCODEC_INIT
static
#endif
void avcodec_init(void) void avcodec_init(void)
{ {
static int initialized = 0; static int initialized = 0;

View File

@ -80,5 +80,8 @@
#ifndef FF_API_VERY_AGGRESSIVE #ifndef FF_API_VERY_AGGRESSIVE
#define FF_API_VERY_AGGRESSIVE (LIBAVCODEC_VERSION_MAJOR < 54) #define FF_API_VERY_AGGRESSIVE (LIBAVCODEC_VERSION_MAJOR < 54)
#endif #endif
#ifndef FF_API_AVCODEC_INIT
#define FF_API_AVCODEC_INIT (LIBAVCODEC_VERSION_MAJOR < 54)
#endif
#endif /* AVCODEC_VERSION_H */ #endif /* AVCODEC_VERSION_H */