[FFmpeg-cvslog] http/utils: move mime -> demuxer maping from http to utils
Michael Niedermayer
git at videolan.org
Sun Dec 9 20:39:50 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec 9 20:24:49 2012 +0100| [68bc012190f9732a0f103fdd08f9bc63edc1c74d] | committer: Michael Niedermayer
http/utils: move mime -> demuxer maping from http to utils
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=68bc012190f9732a0f103fdd08f9bc63edc1c74d
---
libavformat/http.c | 6 ++----
libavformat/utils.c | 4 +++-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/libavformat/http.c b/libavformat/http.c
index 06e0d39..0d71726 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -357,10 +357,8 @@ static int process_line(URLContext *h, char *line, int line_count,
s->willclose = 1;
} else if (!av_strcasecmp (tag, "Server") && !av_strcasecmp (p, "AkamaiGHost")) {
s->is_akamai = 1;
- } else if (!av_strcasecmp (tag, "Content-Type")) {
- if (!av_strcasecmp (p, "audio/aacp")) {
- av_free(s->demuxer); s->demuxer = av_strdup("aac");
- }
+ } else if (!av_strcasecmp (tag, "Content-Type") && p) {
+ av_free(s->demuxer); s->demuxer = av_strdup(p);
}
}
return 1;
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3439d2c..62d5187 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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) {
- *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;
More information about the ffmpeg-cvslog
mailing list