Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
4c8296b5
Commit
4c8296b5
authored
Jun 22, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specifying a sout RTP port number using a sout MRL
parent
a458b6af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
16 deletions
+29
-16
src/stream_output/stream_output.c
src/stream_output/stream_output.c
+29
-16
No files found.
src/stream_output/stream_output.c
View file @
4c8296b5
...
...
@@ -813,33 +813,46 @@ static char *_sout_stream_url_to_chain( vlc_object_t *p_this,
{
mrl_t
mrl
;
char
*
psz_chain
;
const
char
*
fmt
=
"standard{mux=
\"
%s
\"
,access=
\"
%s
\"
,dst=
\"
%s
\"
}"
;
static
const
char
rtpfmt
[]
=
"rtp{mux=
\"
%s
\"
,proto=
\"
%s
\"
,dst=
\"
%s
\"
}"
;
mrl_Parse
(
&
mrl
,
psz_url
);
/* Check if the URLs goes #rtp - otherwise we'll use #standard */
/* Check if the URLs goes to #rtp - otherwise we'll use #standard */
static
const
char
rtplist
[]
=
"dccp
\0
sctp
\0
tcp
\0
udplite
\0
"
;
for
(
const
char
*
a
=
rtplist
;
*
a
;
a
+=
strlen
(
a
)
+
1
)
if
(
strcmp
(
a
,
mrl
.
psz_access
)
==
0
)
goto
rtp
;
if
(
strcmp
(
mrl
.
psz_access
,
"rtp"
)
==
0
)
{
char
*
port
;
/* For historical reasons, rtp:// means RTP over UDP */
strcpy
(
mrl
.
psz_access
,
"udp"
);
fmt
=
rtpfmt
;
}
else
rtp:
if
(
mrl
.
psz_name
[
0
]
==
'['
)
{
static
const
char
list
[]
=
"dccp
\0
sctp
\0
tcp
\0
udplite
\0
"
;
for
(
const
char
*
a
=
list
;
*
a
;
a
+=
strlen
(
a
)
+
1
)
if
(
strcmp
(
a
,
mrl
.
psz_access
)
==
0
)
{
fmt
=
rtpfmt
;
break
;
port
=
strstr
(
mrl
.
psz_name
,
"]:"
);
if
(
port
!=
NULL
)
port
++
;
}
else
port
=
strchr
(
mrl
.
psz_name
,
':'
);
if
(
port
!=
NULL
)
*
port
++
=
'\0'
;
/* erase ':' */
if
(
asprintf
(
&
psz_chain
,
"rtp{mux=
\"
%s
\"
,proto=
\"
%s
\"
,dst=
\"
%s%s%s
\"
}"
,
mrl
.
psz_way
,
mrl
.
psz_access
,
mrl
.
psz_name
,
port
?
"
\"
,port=
\"
"
:
""
,
port
?
port
:
""
)
==
-
1
)
psz_chain
=
NULL
;
}
/* Convert the URL to a basic sout chain */
if
(
asprintf
(
&
psz_chain
,
fmt
,
else
{
/* Convert the URL to a basic standard sout chain */
if
(
asprintf
(
&
psz_chain
,
"standard{mux=
\"
%s
\"
,access=
\"
%s
\"
,dst=
\"
%s
\"
}"
,
mrl
.
psz_way
,
mrl
.
psz_access
,
mrl
.
psz_name
)
==
-
1
)
psz_chain
=
NULL
;
}
/* Duplicate and wrap if sout-display is on */
if
(
psz_chain
&&
(
config_GetInt
(
p_this
,
"sout-display"
)
>
0
))
...
...
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