Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
730eefea
Commit
730eefea
authored
Apr 03, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Protect against unsupported/invalid wav speaker mask.
parent
d9f560ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
modules/demux/wav.c
modules/demux/wav.c
+11
-1
No files found.
modules/demux/wav.c
View file @
730eefea
...
...
@@ -123,7 +123,7 @@ static int Open( vlc_object_t * p_this )
return
VLC_ENOMEM
;
p_sys
->
p_es
=
NULL
;
p_sys
->
b_chan_reorder
=
0
;
p_sys
->
b_chan_reorder
=
false
;
p_sys
->
i_channel_mask
=
0
;
/* skip riff header */
...
...
@@ -197,10 +197,20 @@ static int Open( vlc_object_t * p_this )
i_channel_mask
=
GetDWLE
(
&
p_wf_ext
->
dwChannelMask
);
if
(
i_channel_mask
)
{
int
i_match
=
0
;
for
(
i
=
0
;
i
<
sizeof
(
pi_channels_src
)
/
sizeof
(
uint32_t
);
i
++
)
{
if
(
i_channel_mask
&
pi_channels_src
[
i
]
)
{
if
(
!
(
p_sys
->
i_channel_mask
&
pi_channels_in
[
i
]
)
)
i_match
++
;
p_sys
->
i_channel_mask
|=
pi_channels_in
[
i
];
}
}
if
(
i_match
!=
p_sys
->
fmt
.
audio
.
i_channels
)
{
msg_Err
(
p_demux
,
"Invalid/unsupported channel mask"
);
p_sys
->
i_channel_mask
=
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