# HG changeset patch # User stefano # Date 1262349984 0 # Node ID 0794c77c3c4649a8ad93cef9b019bf3f9fe609fd # Parent ce42544aa9046193543311d565b340ce4ab60b70 Deprecate guess_format() in favor of av_guess_format(). diff -r ce42544aa904 -r 0794c77c3c46 avformat.h --- a/avformat.h Fri Jan 01 12:29:22 2010 +0000 +++ b/avformat.h Fri Jan 01 12:46:24 2010 +0000 @@ -22,7 +22,7 @@ #define AVFORMAT_AVFORMAT_H #define LIBAVFORMAT_VERSION_MAJOR 52 -#define LIBAVFORMAT_VERSION_MINOR 44 +#define LIBAVFORMAT_VERSION_MINOR 45 #define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ @@ -716,6 +716,13 @@ attribute_deprecated AVOutputFormat *guess_stream_format(const char *short_name, const char *filename, const char *mime_type); + +/** + * @deprecated Use av_guess_format() instead. + */ +attribute_deprecated AVOutputFormat *guess_format(const char *short_name, + const char *filename, + const char *mime_type); #endif /** @@ -730,7 +737,7 @@ * @param mime_type if non-NULL checks if mime_type matches with the * MIME type of the registered formats */ -AVOutputFormat *guess_format(const char *short_name, +AVOutputFormat *av_guess_format(const char *short_name, const char *filename, const char *mime_type); diff -r ce42544aa904 -r 0794c77c3c46 utils.c --- a/utils.c Fri Jan 01 12:29:22 2010 +0000 +++ b/utils.c Fri Jan 01 12:46:24 2010 +0000 @@ -182,9 +182,17 @@ return !strcasecmp(name, names); } +#if LIBAVFORMAT_VERSION_MAJOR < 53 AVOutputFormat *guess_format(const char *short_name, const char *filename, const char *mime_type) { + return av_guess_format(short_name, filename, mime_type); +} +#endif + +AVOutputFormat *av_guess_format(const char *short_name, const char *filename, + const char *mime_type) +{ AVOutputFormat *fmt, *fmt_found; int score_max, score;