Commit 68bc0121 authored by Michael Niedermayer's avatar Michael Niedermayer

http/utils: move mime -> demuxer maping from http to utils

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0af7ccd9
...@@ -357,10 +357,8 @@ static int process_line(URLContext *h, char *line, int line_count, ...@@ -357,10 +357,8 @@ static int process_line(URLContext *h, char *line, int line_count,
s->willclose = 1; s->willclose = 1;
} else if (!av_strcasecmp (tag, "Server") && !av_strcasecmp (p, "AkamaiGHost")) { } else if (!av_strcasecmp (tag, "Server") && !av_strcasecmp (p, "AkamaiGHost")) {
s->is_akamai = 1; s->is_akamai = 1;
} else if (!av_strcasecmp (tag, "Content-Type")) { } else if (!av_strcasecmp (tag, "Content-Type") && p) {
if (!av_strcasecmp (p, "audio/aacp")) { av_free(s->demuxer); s->demuxer = av_strdup(p);
av_free(s->demuxer); s->demuxer = av_strdup("aac");
}
} }
} }
return 1; return 1;
......
...@@ -429,7 +429,9 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt, ...@@ -429,7 +429,9 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
} }
if (!*fmt && pb && pb->av_class && av_opt_get(pb, "demuxer", AV_OPT_SEARCH_CHILDREN, &demuxer_name) >= 0 && demuxer_name) { if (!*fmt && pb && pb->av_class && av_opt_get(pb, "demuxer", AV_OPT_SEARCH_CHILDREN, &demuxer_name) >= 0 && demuxer_name) {
*fmt = av_find_input_format(demuxer_name); if (!av_strcasecmp(demuxer_name, "audio/aacp")) {
*fmt = av_find_input_format("aac");
}
} }
for(probe_size= PROBE_BUF_MIN; probe_size<=max_probe_size && !*fmt; for(probe_size= PROBE_BUF_MIN; probe_size<=max_probe_size && !*fmt;
......
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