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
c9d33a61
Commit
c9d33a61
authored
Sep 09, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_out: match exactly access/mux for warnings
parent
a25aa2c0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
modules/stream_out/standard.c
modules/stream_out/standard.c
+15
-6
No files found.
modules/stream_out/standard.c
View file @
c9d33a61
...
...
@@ -292,24 +292,33 @@ static int fixAccessMux( sout_stream_t *p_stream, char **ppsz_mux,
return
0
;
}
static
bool
exactMatch
(
const
char
*
psz_target
,
const
char
*
psz_string
,
size_t
i_len
)
{
if
(
strncmp
(
psz_target
,
psz_string
,
i_len
)
)
return
false
;
else
return
(
psz_target
[
i_len
]
<
'a'
||
psz_target
[
i_len
]
>
'z'
);
}
static
void
checkAccessMux
(
sout_stream_t
*
p_stream
,
char
*
psz_access
,
char
*
psz_mux
)
{
if
(
!
strncmp
(
psz_access
,
"mmsh"
,
4
)
&&
strncmp
(
psz_mux
,
"asfh"
,
4
)
)
if
(
exactMatch
(
psz_access
,
"mmsh"
,
4
)
&&
!
exactMatch
(
psz_mux
,
"asfh"
,
4
)
)
msg_Err
(
p_stream
,
"mmsh output is only valid with asfh mux"
);
else
if
(
strncmp
(
psz_access
,
"file"
,
4
)
&&
(
!
strncmp
(
psz_mux
,
"mov"
,
3
)
||
!
strncmp
(
psz_mux
,
"mp4"
,
3
)
)
)
else
if
(
exactMatch
(
psz_access
,
"file"
,
4
)
&&
(
exactMatch
(
psz_mux
,
"mov"
,
3
)
||
exactMatch
(
psz_mux
,
"mp4"
,
3
)
)
)
msg_Err
(
p_stream
,
"mov and mp4 mux are only valid with file output"
);
else
if
(
!
strncmp
(
psz_access
,
"udp"
,
3
)
)
else
if
(
exactMatch
(
psz_access
,
"udp"
,
3
)
)
{
if
(
!
strncmp
(
psz_mux
,
"ffmpeg"
,
6
)
||
!
strncmp
(
psz_mux
,
"avformat"
,
8
)
)
if
(
exactMatch
(
psz_mux
,
"ffmpeg"
,
6
)
||
exactMatch
(
psz_mux
,
"avformat"
,
8
)
)
{
/* why would you use ffmpeg's ts muxer ? YOU DON'T LOVE VLC ??? */
char
*
psz_ffmpeg_mux
=
var_CreateGetString
(
p_stream
,
"sout-avformat-mux"
);
if
(
!
psz_ffmpeg_mux
||
strncmp
(
psz_ffmpeg_mux
,
"mpegts"
,
6
)
)
msg_Err
(
p_stream
,
"UDP output is only valid with TS mux"
);
free
(
psz_ffmpeg_mux
);
}
else
if
(
strncmp
(
psz_mux
,
"ts"
,
2
)
)
else
if
(
!
exactMatch
(
psz_mux
,
"ts"
,
2
)
)
msg_Err
(
p_stream
,
"UDP output is only valid with TS mux"
);
}
}
...
...
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