From 8eb631fa50868e2d14e97d396711ced859fef515 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Fri, 1 Jan 2010 23:50:10 +0000 Subject: Deprecate match_ext() in favor of av_match_ext(), and mark it for deletion at the next major bump. Originally committed as revision 20998 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/avformat.h | 11 +++++++++-- libavformat/utils.c | 7 +++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 69d0054ada..a21cfa4360 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -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 @@ void url_split(char *proto, int proto_size, 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 --git a/libavformat/utils.c b/libavformat/utils.c index a4c7219e1e..316986cfde 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -137,7 +137,14 @@ void av_register_output_format(AVOutputFormat *format) 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; -- cgit v1.2.3