Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
30ff7129
Commit
30ff7129
authored
Oct 19, 2006
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* prevent potential crashes on files with broken channelcount
parent
4e03ca06
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
modules/codec/realaudio.c
modules/codec/realaudio.c
+8
-0
modules/codec/speex.c
modules/codec/speex.c
+7
-0
modules/codec/vorbis.c
modules/codec/vorbis.c
+9
-0
No files found.
modules/codec/realaudio.c
View file @
30ff7129
...
@@ -185,6 +185,14 @@ static int Open( vlc_object_t *p_this )
...
@@ -185,6 +185,14 @@ static int Open( vlc_object_t *p_this )
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
if
(
p_dec
->
fmt_in
.
audio
.
i_channels
<=
0
||
p_dec
->
fmt_in
.
audio
.
i_channels
>
6
)
{
msg_Err
(
p_dec
,
"invalid number of channels (not between 1 and 6): %i"
,
p_dec
->
fmt_in
.
audio
.
i_channels
);
return
VLC_EGENERIC
;
}
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
decoder_sys_t
)
);
p_dec
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
decoder_sys_t
)
);
memset
(
p_sys
,
0
,
sizeof
(
decoder_sys_t
)
);
memset
(
p_sys
,
0
,
sizeof
(
decoder_sys_t
)
);
...
...
modules/codec/speex.c
View file @
30ff7129
...
@@ -383,6 +383,13 @@ static int ProcessInitialHeader( decoder_t *p_dec, ogg_packet *p_oggpacket )
...
@@ -383,6 +383,13 @@ static int ProcessInitialHeader( decoder_t *p_dec, ogg_packet *p_oggpacket )
callback
.
data
=
&
p_sys
->
stereo
;
callback
.
data
=
&
p_sys
->
stereo
;
speex_decoder_ctl
(
p_state
,
SPEEX_SET_HANDLER
,
&
callback
);
speex_decoder_ctl
(
p_state
,
SPEEX_SET_HANDLER
,
&
callback
);
}
}
if
(
p_header
->
nb_channels
<=
0
||
p_header
->
nb_channels
>
5
)
{
msg_Err
(
p_dec
,
"invalid number of channels (not between 1 and 5): %i"
,
p_header
->
nb_channels
);
return
VLC_EGENERIC
;
}
/* Setup the format */
/* Setup the format */
p_dec
->
fmt_out
.
audio
.
i_physical_channels
=
p_dec
->
fmt_out
.
audio
.
i_physical_channels
=
...
...
modules/codec/vorbis.c
View file @
30ff7129
...
@@ -387,6 +387,15 @@ static int ProcessHeaders( decoder_t *p_dec )
...
@@ -387,6 +387,15 @@ static int ProcessHeaders( decoder_t *p_dec )
/* Setup the format */
/* Setup the format */
p_dec
->
fmt_out
.
audio
.
i_rate
=
p_sys
->
vi
.
rate
;
p_dec
->
fmt_out
.
audio
.
i_rate
=
p_sys
->
vi
.
rate
;
p_dec
->
fmt_out
.
audio
.
i_channels
=
p_sys
->
vi
.
channels
;
p_dec
->
fmt_out
.
audio
.
i_channels
=
p_sys
->
vi
.
channels
;
if
(
p_dec
->
fmt_out
.
audio
.
i_channels
<
0
||
p_dec
->
fmt_out
.
audio
.
i_channels
>
6
)
{
msg_Err
(
p_dec
,
"invalid number of channels (not between 1 and 6): %i"
,
p_dec
->
fmt_out
.
audio
.
i_channels
);
return
VLC_EGENERIC
;
}
p_dec
->
fmt_out
.
audio
.
i_physical_channels
=
p_dec
->
fmt_out
.
audio
.
i_physical_channels
=
p_dec
->
fmt_out
.
audio
.
i_original_channels
=
p_dec
->
fmt_out
.
audio
.
i_original_channels
=
pi_channels_maps
[
p_sys
->
vi
.
channels
];
pi_channels_maps
[
p_sys
->
vi
.
channels
];
...
...
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