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
b1ce8003
Commit
b1ce8003
authored
Aug 01, 2016
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/teeproto: Support parsing protocol options
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
c5cc3b08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
Makefile
libavformat/Makefile
+1
-1
teeproto.c
libavformat/teeproto.c
+14
-5
No files found.
libavformat/Makefile
View file @
b1ce8003
...
...
@@ -566,7 +566,7 @@ OBJS-$(CONFIG_RTP_PROTOCOL) += rtpproto.o
OBJS-$(CONFIG_SCTP_PROTOCOL)
+=
sctp.o
OBJS-$(CONFIG_SRTP_PROTOCOL)
+=
srtpproto.o
srtp.o
OBJS-$(CONFIG_SUBFILE_PROTOCOL)
+=
subfile.o
OBJS-$(CONFIG_TEE_PROTOCOL)
+=
teeproto.o
OBJS-$(CONFIG_TEE_PROTOCOL)
+=
teeproto.o
tee_common.o
OBJS-$(CONFIG_TCP_PROTOCOL)
+=
tcp.o
OBJS-$(CONFIG_TLS_GNUTLS_PROTOCOL)
+=
tls_gnutls.o
tls.o
OBJS-$(CONFIG_TLS_OPENSSL_PROTOCOL)
+=
tls_openssl.o
tls.o
...
...
libavformat/teeproto.c
View file @
b1ce8003
...
...
@@ -23,6 +23,7 @@
#include "libavutil/opt.h"
#include "avformat.h"
#include "avio_internal.h"
#include "tee_common.h"
typedef
struct
ChildContext
{
URLContext
*
url_context
;
...
...
@@ -89,9 +90,11 @@ static int tee_open(URLContext *h, const char *filename, int flags)
return
AVERROR
(
ENOSYS
);
while
(
*
filename
)
{
char
*
child_name
=
av_get_token
(
&
filename
,
child_delim
);
char
*
child_string
=
av_get_token
(
&
filename
,
child_delim
);
char
*
child_name
=
NULL
;
void
*
tmp
;
if
(
!
child_name
)
{
AVDictionary
*
options
=
NULL
;
if
(
!
child_string
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
...
...
@@ -99,16 +102,22 @@ static int tee_open(URLContext *h, const char *filename, int flags)
tmp
=
av_realloc_array
(
c
->
child
,
c
->
child_count
+
1
,
sizeof
(
*
c
->
child
));
if
(
!
tmp
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
goto
loop_
fail
;
}
c
->
child
=
tmp
;
memset
(
&
c
->
child
[
c
->
child_count
],
0
,
sizeof
(
c
->
child
[
c
->
child_count
]));
ret
=
ff_tee_parse_slave_options
(
h
,
child_string
,
&
options
,
&
child_name
);
if
(
ret
<
0
)
goto
loop_fail
;
ret
=
ffurl_open_whitelist
(
&
c
->
child
[
c
->
child_count
].
url_context
,
child_name
,
flags
,
&
h
->
interrupt_callback
,
/*AVDictionary **options*/
NULL
,
&
h
->
interrupt_callback
,
&
options
,
h
->
protocol_whitelist
,
h
->
protocol_blacklist
,
h
);
av_free
(
child_name
);
loop_fail:
av_freep
(
&
child_string
);
av_dict_free
(
&
options
);
if
(
ret
<
0
)
goto
fail
;
c
->
child_count
++
;
...
...
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