# HG changeset patch # User stefano # Date 1262389810 0 # Node ID 611a8e6209be91ac0fe19c8c1ce82973eeed360c # Parent 033545e4dfd09d34850927facfa5a601ff0992b9 Deprecate match_ext() in favor of av_match_ext(), and mark it for deletion at the next major bump. diff -r 033545e4dfd0 -r 611a8e6209be avformat.h --- a/avformat.h Fri Jan 01 12:58:03 2010 +0000 +++ b/avformat.h Fri Jan 01 23:50:10 2010 +0000 @@ -22,7 +22,7 @@ #define AVFORMAT_AVFORMAT_H #define LIBAVFORMAT_VERSION_MAJOR 52 -#define LIBAVFORMAT_VERSION_MINOR 45 +#define LIBAVFORMAT_VERSION_MINOR 46 #define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ @@ -1301,13 +1301,20 @@ char *path, int path_size, const char *url); +#if LIBAVFORMAT_VERSION_MAJOR < 53 +/** + * @deprecated Use av_match_ext() instead. + */ +attribute_deprecated int match_ext(const char *filename, const char *extensions); +#endif + /** * Returns a positive value if the given filename has one of the given * extensions, 0 otherwise. * * @param extensions a comma-separated list of filename extensions */ -int match_ext(const char *filename, const char *extensions); +int av_match_ext(const char *filename, const char *extensions); #endif /* HAVE_AV_CONFIG_H */ diff -r 033545e4dfd0 -r 611a8e6209be utils.c --- a/utils.c Fri Jan 01 12:58:03 2010 +0000 +++ b/utils.c Fri Jan 01 23:50:10 2010 +0000 @@ -137,8 +137,15 @@ format->next = NULL; } +#if LIBAVFORMAT_VERSION_MAJOR < 53 int match_ext(const char *filename, const char *extensions) { + return av_match_ext(filename, extensions); +} +#endif + +int av_match_ext(const char *filename, const char *extensions) +{ const char *ext, *p; char ext1[32], *q;