mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
http/utils: rename "demuxer" to mime_type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
cbe43e62c9
commit
20899c54f0
@ -63,7 +63,7 @@ typedef struct {
|
||||
int post_datalen;
|
||||
int is_akamai;
|
||||
int rw_timeout;
|
||||
char *demuxer;
|
||||
char *mime_type;
|
||||
} HTTPContext;
|
||||
|
||||
#define OFFSET(x) offsetof(HTTPContext, x)
|
||||
@ -79,7 +79,7 @@ static const AVOption options[] = {
|
||||
{"multiple_requests", "use persistent connections", OFFSET(multiple_requests), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D|E },
|
||||
{"post_data", "custom HTTP post data", OFFSET(post_data), AV_OPT_TYPE_BINARY, .flags = D|E },
|
||||
{"timeout", "timeout of socket i/o operations", OFFSET(rw_timeout), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, D|E },
|
||||
{"demuxer", "", OFFSET(demuxer), AV_OPT_TYPE_STRING, {0}, 0, 0, 0 },
|
||||
{"mime_type", "", OFFSET(mime_type), AV_OPT_TYPE_STRING, {0}, 0, 0, 0 },
|
||||
{NULL}
|
||||
};
|
||||
#define HTTP_CLASS(flavor)\
|
||||
@ -358,7 +358,7 @@ static int process_line(URLContext *h, char *line, int line_count,
|
||||
} else if (!av_strcasecmp (tag, "Server") && !av_strcasecmp (p, "AkamaiGHost")) {
|
||||
s->is_akamai = 1;
|
||||
} else if (!av_strcasecmp (tag, "Content-Type") && p) {
|
||||
av_free(s->demuxer); s->demuxer = av_strdup(p);
|
||||
av_free(s->mime_type); s->mime_type = av_strdup(p);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
@ -413,7 +413,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
|
||||
{
|
||||
AVProbeData pd = { filename ? filename : "", NULL, -offset };
|
||||
unsigned char *buf = NULL;
|
||||
uint8_t *demuxer_name;
|
||||
uint8_t *mime_type;
|
||||
int ret = 0, probe_size, buf_offset = 0;
|
||||
|
||||
if (!max_probe_size) {
|
||||
@ -428,8 +428,8 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
if (!*fmt && pb && pb->av_class && av_opt_get(pb, "demuxer", AV_OPT_SEARCH_CHILDREN, &demuxer_name) >= 0 && demuxer_name) {
|
||||
if (!av_strcasecmp(demuxer_name, "audio/aacp")) {
|
||||
if (!*fmt && pb && pb->av_class && av_opt_get(pb, "mime_type", AV_OPT_SEARCH_CHILDREN, &mime_type) >= 0 && mime_type) {
|
||||
if (!av_strcasecmp(mime_type, "audio/aacp")) {
|
||||
*fmt = av_find_input_format("aac");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user