summaryrefslogtreecommitdiff
path: root/libavformat/format.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-07-29 14:29:13 +0100
committerLuca Barbato <lu_zero@gentoo.org>2014-07-29 17:46:29 +0200
commit69e7336b8e16ee65226fc20381baf537f4b125e6 (patch)
treeefa6771a621e6187dbc09bfbc2ec1f0540a76354 /libavformat/format.c
parente253a9e2b3d683eb51db7c776326eb07de10ad4c (diff)
downloadffmpeg-69e7336b8e16ee65226fc20381baf537f4b125e6.tar.gz
avstring: Expose the simple name match function
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavformat/format.c')
-rw-r--r--libavformat/format.c20
1 files changed, 1 insertions, 19 deletions
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;
}