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
ea422217
Commit
ea422217
authored
Feb 18, 2013
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auhal: don't leak audio data and avoid useless memcpy
parent
46369f3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
10 deletions
+1
-10
modules/audio_output/auhal.c
modules/audio_output/auhal.c
+1
-10
No files found.
modules/audio_output/auhal.c
View file @
ea422217
...
...
@@ -1181,20 +1181,11 @@ static void Play (audio_output_t * p_aout, block_t * p_block)
VLC_CODEC_FL32
);
}
/* Render audio into buffer */
AudioBufferList
bufferList
;
bufferList
.
mNumberBuffers
=
1
;
bufferList
.
mBuffers
[
0
].
mNumberChannels
=
p_sys
->
i_numberOfChannels
;
bufferList
.
mBuffers
[
0
].
mData
=
malloc
(
p_block
->
i_nb_samples
*
sizeof
(
Float32
)
*
p_sys
->
i_numberOfChannels
);
bufferList
.
mBuffers
[
0
].
mDataByteSize
=
p_block
->
i_nb_samples
*
sizeof
(
Float32
)
*
p_sys
->
i_numberOfChannels
;
memcpy
(
bufferList
.
mBuffers
[
0
].
mData
,
p_block
->
p_buffer
,
p_block
->
i_buffer
);
/* keep track of the played data */
p_aout
->
sys
->
i_played_length
+=
p_block
->
i_length
;
/* move data to buffer */
TPCircularBufferProduceBytes
(
&
p_sys
->
circular_buffer
,
bufferList
.
mBuffers
[
0
].
mData
,
bufferList
.
mBuffers
[
0
].
mDataByteSize
);
TPCircularBufferProduceBytes
(
&
p_sys
->
circular_buffer
,
p_block
->
p_buffer
,
p_block
->
i_buffer
);
}
block_Release
(
p_block
);
...
...
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