summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-01-01 12:46:24 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-01-01 12:46:24 +0000
commita1f547b94a89b7d39a7dc583b048052d4d8a50e3 (patch)
tree3bf90032963f2887c9b1826df94b34d9d74b5d4d
parentdebe86bfedeb3dce40efb726f8ea28cdf086ed0a (diff)
Deprecate guess_format() in favor of av_guess_format().
Originally committed as revision 20991 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/avformat.h11
-rw-r--r--libavformat/utils.c8
2 files changed, 17 insertions, 2 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 1d05b0b0de..7fc10a33f5 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 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 @@ void av_register_output_format(AVOutputFormat *format);
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 @@ attribute_deprecated AVOutputFormat *guess_stream_format(const char *short_name,
* @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 --git a/libavformat/utils.c b/libavformat/utils.c
index 5eb360c229..79c5a1d36b 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -182,9 +182,17 @@ static int match_format(const char *name, const char *names)
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;