API changes, most recent first:
+2014-07-xx - xxxxxxx - lavu 53.19.0 - avstring.h
+ Make name matching function from lavf public as av_match_name().
+
2014-xx-xx - xxxxxxx - lavc 55.57.0 - avcodec.h
Add AV_CODEC_PROP_REORDER to mark codecs supporting frame reordering.
return 0;
}
-static int match_format(const char *name, const char *names)
-{
- const char *p;
- int len, namelen;
-
- if (!name || !names)
- return 0;
-
- namelen = strlen(name);
- while ((p = strchr(names, ','))) {
- len = FFMAX(p - names, namelen);
- if (!av_strncasecmp(name, names, len))
- return 1;
- names = p + 1;
- }
- return !av_strcasecmp(name, names);
-}
-
AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
const char *mime_type)
{
{
AVInputFormat *fmt = NULL;
while ((fmt = av_iformat_next(fmt)))
- if (match_format(short_name, fmt->name))
+ if (av_match_name(short_name, fmt->name))
return fmt;
return NULL;
}
return av_isdigit(c) || (c >= 'a' && c <= 'f');
}
+int av_match_name(const char *name, const char *names)
+{
+ const char *p;
+ int len, namelen;
+
+ if (!name || !names)
+ return 0;
+
+ namelen = strlen(name);
+ while ((p = strchr(names, ','))) {
+ len = FFMAX(p - names, namelen);
+ if (!av_strncasecmp(name, names, len))
+ return 1;
+ names = p + 1;
+ }
+ return !av_strcasecmp(name, names);
+}
+
+
+
#ifdef TEST
int main(void)
*/
const char *av_dirname(char *path);
+
+/**
+ * Match instances of a name in a comma-separated list of names.
+ * @param name Name to look for.
+ * @param names List of names.
+ * @return 1 on match, 0 otherwise.
+ */
+int av_match_name(const char *name, const char *names);
+
/**
* @}
*/
*/
#define LIBAVUTIL_VERSION_MAJOR 53
-#define LIBAVUTIL_VERSION_MINOR 18
+#define LIBAVUTIL_VERSION_MINOR 19
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \