From 69e7336b8e16ee65226fc20381baf537f4b125e6 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Tue, 29 Jul 2014 14:29:13 +0100 Subject: avstring: Expose the simple name match function Signed-off-by: Vittorio Giovara --- libavformat/format.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'libavformat/format.c') diff --git a/libavformat/format.c b/libavformat/format.c index 073f770942..1dd83f5587 100644 --- a/libavformat/format.c +++ b/libavformat/format.c @@ -100,24 +100,6 @@ int av_match_ext(const char *filename, const char *extensions) 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) { @@ -180,7 +162,7 @@ AVInputFormat *av_find_input_format(const char *short_name) { 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; } -- cgit v1.2.3