Commit aa13b573 authored by Stefano Sabatini's avatar Stefano Sabatini

Use av_match_ext() in place of the deprecated match_ext() function.

Originally committed as revision 21000 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 79c2f2d3
...@@ -1340,20 +1340,20 @@ static int http_parse_request(HTTPContext *c) ...@@ -1340,20 +1340,20 @@ static int http_parse_request(HTTPContext *c)
} }
redir_type = REDIR_NONE; redir_type = REDIR_NONE;
if (match_ext(filename, "asx")) { if (av_match_ext(filename, "asx")) {
redir_type = REDIR_ASX; redir_type = REDIR_ASX;
filename[strlen(filename)-1] = 'f'; filename[strlen(filename)-1] = 'f';
} else if (match_ext(filename, "asf") && } else if (av_match_ext(filename, "asf") &&
(!useragent || strncasecmp(useragent, "NSPlayer", 8) != 0)) { (!useragent || strncasecmp(useragent, "NSPlayer", 8) != 0)) {
/* if this isn't WMP or lookalike, return the redirector file */ /* if this isn't WMP or lookalike, return the redirector file */
redir_type = REDIR_ASF; redir_type = REDIR_ASF;
} else if (match_ext(filename, "rpm,ram")) { } else if (av_match_ext(filename, "rpm,ram")) {
redir_type = REDIR_RAM; redir_type = REDIR_RAM;
strcpy(filename + strlen(filename)-2, "m"); strcpy(filename + strlen(filename)-2, "m");
} else if (match_ext(filename, "rtsp")) { } else if (av_match_ext(filename, "rtsp")) {
redir_type = REDIR_RTSP; redir_type = REDIR_RTSP;
compute_real_filename(filename, sizeof(filename) - 1); compute_real_filename(filename, sizeof(filename) - 1);
} else if (match_ext(filename, "sdp")) { } else if (av_match_ext(filename, "sdp")) {
redir_type = REDIR_SDP; redir_type = REDIR_SDP;
compute_real_filename(filename, sizeof(filename) - 1); compute_real_filename(filename, sizeof(filename) - 1);
} }
......
...@@ -222,7 +222,7 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename, ...@@ -222,7 +222,7 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
if (fmt->mime_type && mime_type && !strcmp(fmt->mime_type, mime_type)) if (fmt->mime_type && mime_type && !strcmp(fmt->mime_type, mime_type))
score += 10; score += 10;
if (filename && fmt->extensions && if (filename && fmt->extensions &&
match_ext(filename, fmt->extensions)) { av_match_ext(filename, fmt->extensions)) {
score += 5; score += 5;
} }
if (score > score_max) { if (score > score_max) {
...@@ -325,7 +325,7 @@ static AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int ...@@ -325,7 +325,7 @@ static AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int
if (fmt1->read_probe) { if (fmt1->read_probe) {
score = fmt1->read_probe(pd); score = fmt1->read_probe(pd);
} else if (fmt1->extensions) { } else if (fmt1->extensions) {
if (match_ext(pd->filename, fmt1->extensions)) { if (av_match_ext(pd->filename, fmt1->extensions)) {
score = 50; score = 50;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment