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
6c4493a7
Commit
6c4493a7
authored
Apr 08, 2014
by
Tristan Matthews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
visual: don't crash on empty buffers
Fixes #10533
parent
cbea0ade
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
modules/visualization/glspectrum.c
modules/visualization/glspectrum.c
+5
-0
modules/visualization/visual/effects.c
modules/visualization/visual/effects.c
+10
-0
No files found.
modules/visualization/glspectrum.c
View file @
6c4493a7
...
@@ -447,6 +447,11 @@ static void *Thread( void *p_data )
...
@@ -447,6 +447,11 @@ static void *Thread( void *p_data )
int16_t
*
p_buffs
;
/* int16_t converted buffer */
int16_t
*
p_buffs
;
/* int16_t converted buffer */
int16_t
*
p_s16_buff
;
/* int16_t converted buffer */
int16_t
*
p_s16_buff
;
/* int16_t converted buffer */
if
(
!
block
->
i_nb_samples
)
{
msg_Err
(
p_filter
,
"no samples yet"
);
goto
release
;
}
/* Allocate the buffer only if the number of samples change */
/* Allocate the buffer only if the number of samples change */
if
(
block
->
i_nb_samples
!=
p_sys
->
i_prev_nb_samples
)
if
(
block
->
i_nb_samples
!=
p_sys
->
i_prev_nb_samples
)
{
{
...
...
modules/visualization/visual/effects.c
View file @
6c4493a7
...
@@ -119,6 +119,11 @@ static int spectrum_Run(visual_effect_t * p_effect, vlc_object_t *p_aout,
...
@@ -119,6 +119,11 @@ static int spectrum_Run(visual_effect_t * p_effect, vlc_object_t *p_aout,
int16_t
*
p_buffs
;
/* int16_t converted buffer */
int16_t
*
p_buffs
;
/* int16_t converted buffer */
int16_t
*
p_s16_buff
;
/* int16_t converted buffer */
int16_t
*
p_s16_buff
;
/* int16_t converted buffer */
if
(
!
p_buffer
->
i_nb_samples
)
{
msg_Err
(
p_aout
,
"no samples yet"
);
return
-
1
;
}
/* Create p_data if needed */
/* Create p_data if needed */
if
(
!
p_data
)
if
(
!
p_data
)
{
{
...
@@ -451,6 +456,11 @@ static int spectrometer_Run(visual_effect_t * p_effect, vlc_object_t *p_aout,
...
@@ -451,6 +456,11 @@ static int spectrometer_Run(visual_effect_t * p_effect, vlc_object_t *p_aout,
int16_t
*
p_buffs
;
/* int16_t converted buffer */
int16_t
*
p_buffs
;
/* int16_t converted buffer */
int16_t
*
p_s16_buff
;
/* int16_t converted buffer */
int16_t
*
p_s16_buff
;
/* int16_t converted buffer */
if
(
!
p_buffer
->
i_nb_samples
)
{
msg_Err
(
p_aout
,
"no samples yet"
);
return
-
1
;
}
/* Create the data struct if needed */
/* Create the data struct if needed */
spectrometer_data
*
p_data
=
p_effect
->
p_data
;
spectrometer_data
*
p_data
=
p_effect
->
p_data
;
if
(
!
p_data
)
if
(
!
p_data
)
...
...
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