Browse Source

Deprecate guess_format() in favor of av_guess_format().

Originally committed as revision 20991 to svn://svn.ffmpeg.org/ffmpeg/trunk
Stefano Sabatini 15 years ago
parent
commit
a1f547b94a
2 changed files with 17 additions and 2 deletions
  1. 9 2
      libavformat/avformat.h
  2. 8 0
      libavformat/utils.c

+ 9 - 2
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);
 

+ 8 - 0
libavformat/utils.c

@@ -182,8 +182,16 @@ 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;