Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
4e72534d
Commit
4e72534d
authored
Jun 29, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check against too low sample rate and 0 channel count (avoid division by 0)
parent
37402ad5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
src/audio_output/dec.c
src/audio_output/dec.c
+11
-0
No files found.
src/audio_output/dec.c
View file @
4e72534d
...
@@ -59,6 +59,11 @@ static aout_input_t * DecNew( vlc_object_t * p_this, aout_instance_t * p_aout,
...
@@ -59,6 +59,11 @@ static aout_input_t * DecNew( vlc_object_t * p_this, aout_instance_t * p_aout,
p_format
->
i_channels
);
p_format
->
i_channels
);
return
NULL
;
return
NULL
;
}
}
if
(
p_format
->
i_channels
<=
0
)
{
msg_Err
(
p_aout
,
"no audio channels"
);
return
NULL
;
}
if
(
p_format
->
i_rate
>
192000
)
if
(
p_format
->
i_rate
>
192000
)
{
{
...
@@ -66,6 +71,12 @@ static aout_input_t * DecNew( vlc_object_t * p_this, aout_instance_t * p_aout,
...
@@ -66,6 +71,12 @@ static aout_input_t * DecNew( vlc_object_t * p_this, aout_instance_t * p_aout,
p_format
->
i_rate
);
p_format
->
i_rate
);
return
NULL
;
return
NULL
;
}
}
if
(
p_format
->
i_rate
<
4000
)
{
msg_Err
(
p_aout
,
"too low audio sample frequency (%u)"
,
p_format
->
i_rate
);
return
NULL
;
}
/* We can only be called by the decoder, so no need to lock
/* We can only be called by the decoder, so no need to lock
* p_input->lock. */
* p_input->lock. */
...
...
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