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
92854761
Commit
92854761
authored
Aug 22, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Smem: don't divide by 0
Fix #4479 See
https://bugs.kde.org/show_bug.cgi?id=279973
parent
ab9b56ca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
modules/stream_out/smem.c
modules/stream_out/smem.c
+7
-0
No files found.
modules/stream_out/smem.c
View file @
92854761
...
@@ -392,6 +392,13 @@ static int SendAudio( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -392,6 +392,13 @@ static int SendAudio( sout_stream_t *p_stream, sout_stream_id_t *id,
int
i_samples
=
0
;
int
i_samples
=
0
;
i_size
=
p_buffer
->
i_buffer
;
i_size
=
p_buffer
->
i_buffer
;
if
(
id
->
format
->
audio
.
i_channels
<=
0
)
{
msg_Warn
(
p_stream
,
"No buffer given!"
);
block_ChainRelease
(
p_buffer
);
return
VLC_EGENERIC
;
}
i_samples
=
i_size
/
(
(
id
->
format
->
audio
.
i_bitspersample
/
8
)
*
id
->
format
->
audio
.
i_channels
);
i_samples
=
i_size
/
(
(
id
->
format
->
audio
.
i_bitspersample
/
8
)
*
id
->
format
->
audio
.
i_channels
);
/* Calling the prerender callback to get user buffer */
/* Calling the prerender callback to get user buffer */
p_sys
->
pf_audio_prerender_callback
(
id
->
p_data
,
&
p_pcm_buffer
,
i_size
);
p_sys
->
pf_audio_prerender_callback
(
id
->
p_data
,
&
p_pcm_buffer
,
i_size
);
...
...
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