Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
20899c54
Commit
20899c54
authored
Dec 10, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http/utils: rename "demuxer" to mime_type
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
cbe43e62
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
http.c
libavformat/http.c
+3
-3
utils.c
libavformat/utils.c
+3
-3
No files found.
libavformat/http.c
View file @
20899c54
...
...
@@ -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
;
...
...
libavformat/utils.c
View file @
20899c54
...
...
@@ -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_nam
e
;
uint8_t
*
mime_typ
e
;
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_nam
e
)
{
if
(
!
av_strcasecmp
(
demuxer_nam
e
,
"audio/aacp"
))
{
if
(
!*
fmt
&&
pb
&&
pb
->
av_class
&&
av_opt_get
(
pb
,
"
mime_type"
,
AV_OPT_SEARCH_CHILDREN
,
&
mime_type
)
>=
0
&&
mime_typ
e
)
{
if
(
!
av_strcasecmp
(
mime_typ
e
,
"audio/aacp"
))
{
*
fmt
=
av_find_input_format
(
"aac"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment