|
|
@ -100,24 +100,6 @@ int av_match_ext(const char *filename, const char *extensions) |
|
|
|
return 0; |
|
|
|
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, |
|
|
|
AVOutputFormat *av_guess_format(const char *short_name, const char *filename, |
|
|
|
const char *mime_type) |
|
|
|
const char *mime_type) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -180,7 +162,7 @@ AVInputFormat *av_find_input_format(const char *short_name) |
|
|
|
{ |
|
|
|
{ |
|
|
|
AVInputFormat *fmt = NULL; |
|
|
|
AVInputFormat *fmt = NULL; |
|
|
|
while ((fmt = av_iformat_next(fmt))) |
|
|
|
while ((fmt = av_iformat_next(fmt))) |
|
|
|
if (match_format(short_name, fmt->name)) |
|
|
|
if (av_match_name(short_name, fmt->name)) |
|
|
|
return fmt; |
|
|
|
return fmt; |
|
|
|
return NULL; |
|
|
|
return NULL; |
|
|
|
} |
|
|
|
} |
|
|
|