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
8fbafffc
Commit
8fbafffc
authored
May 22, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace remaining call sites of aout_BufferFree()
parent
e412bf62
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
20 additions
and
24 deletions
+20
-24
include/vlc_aout.h
include/vlc_aout.h
+0
-2
modules/audio_output/audioqueue.c
modules/audio_output/audioqueue.c
+1
-1
modules/audio_output/auhal.c
modules/audio_output/auhal.c
+3
-3
modules/audio_output/directx.c
modules/audio_output/directx.c
+2
-2
modules/audio_output/file.c
modules/audio_output/file.c
+1
-1
modules/audio_output/jack.c
modules/audio_output/jack.c
+1
-3
modules/audio_output/kai.c
modules/audio_output/kai.c
+1
-1
modules/audio_output/oss.c
modules/audio_output/oss.c
+1
-1
modules/audio_output/packet.c
modules/audio_output/packet.c
+3
-3
modules/audio_output/waveout.c
modules/audio_output/waveout.c
+1
-1
src/audio_output/dec.c
src/audio_output/dec.c
+2
-2
src/audio_output/input.c
src/audio_output/input.c
+1
-1
src/input/decoder.c
src/input/decoder.c
+3
-3
No files found.
include/vlc_aout.h
View file @
8fbafffc
...
...
@@ -125,8 +125,6 @@ typedef int32_t vlc_fixed_t;
* Main audio output structures
*****************************************************************************/
#define aout_BufferFree( buffer ) block_Release( buffer )
/* Size of a frame for S/PDIF output. */
#define AOUT_SPDIF_SIZE 6144
...
...
modules/audio_output/audioqueue.c
View file @
8fbafffc
...
...
@@ -184,7 +184,7 @@ void AudioQueueCallback(void * inUserData, AudioQueueRef inAQ, AudioQueueBufferR
if
(
p_buffer
!=
NULL
)
{
vlc_memcpy
(
inBuffer
->
mAudioData
,
p_buffer
->
p_buffer
,
p_buffer
->
i_buffer
);
inBuffer
->
mAudioDataByteSize
=
p_buffer
->
i_buffer
;
aout_BufferFre
e
(
p_buffer
);
block_Releas
e
(
p_buffer
);
}
else
{
vlc_memset
(
inBuffer
->
mAudioData
,
0
,
inBuffer
->
mAudioDataBytesCapacity
);
inBuffer
->
mAudioDataByteSize
=
inBuffer
->
mAudioDataBytesCapacity
;
...
...
modules/audio_output/auhal.c
View file @
8fbafffc
...
...
@@ -1321,7 +1321,7 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout,
vlc_memcpy
(
p_sys
->
p_remainder_buffer
,
&
p_buffer
->
p_buffer
[
i_second_mData_bytes
],
p_sys
->
i_total_bytes
);
aout_BufferFre
e
(
p_buffer
);
block_Releas
e
(
p_buffer
);
break
;
}
else
...
...
@@ -1330,7 +1330,7 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout,
current_date
+=
(
mtime_t
)
(
(
mtime_t
)
1000000
/
p_aout
->
format
.
i_rate
)
*
(
i_second_mData_bytes
/
4
/
aout_FormatNbChannels
(
&
p_aout
->
format
)
);
// 4 is fl32 specific
}
aout_BufferFre
e
(
p_buffer
);
block_Releas
e
(
p_buffer
);
}
else
{
...
...
@@ -1382,7 +1382,7 @@ static OSStatus RenderCallbackSPDIF( AudioDeviceID inDevice,
/* move data into output data buffer */
vlc_memcpy
(
BUFFER
.
mData
,
p_buffer
->
p_buffer
,
p_buffer
->
i_buffer
);
aout_BufferFre
e
(
p_buffer
);
block_Releas
e
(
p_buffer
);
}
else
{
...
...
modules/audio_output/directx.c
View file @
8fbafffc
...
...
@@ -984,7 +984,7 @@ static int FillBuffer( audio_output_t *p_aout, int i_frame,
if
(
dsresult
!=
DS_OK
)
{
msg_Warn
(
p_aout
,
"cannot lock buffer"
);
if
(
p_buffer
)
aout_BufferFre
e
(
p_buffer
);
if
(
p_buffer
)
block_Releas
e
(
p_buffer
);
return
VLC_EGENERIC
;
}
...
...
@@ -1003,7 +1003,7 @@ static int FillBuffer( audio_output_t *p_aout, int i_frame,
}
vlc_memcpy
(
p_write_position
,
p_buffer
->
p_buffer
,
l_bytes1
);
aout_BufferFre
e
(
p_buffer
);
block_Releas
e
(
p_buffer
);
}
/* Now the data has been copied, unlock the buffer */
...
...
modules/audio_output/file.c
View file @
8fbafffc
...
...
@@ -322,5 +322,5 @@ static void Play( audio_output_t * p_aout, block_t *p_buffer )
p_aout
->
sys
->
waveh
.
DataLength
+=
p_buffer
->
i_buffer
;
}
aout_BufferFre
e
(
p_buffer
);
block_Releas
e
(
p_buffer
);
}
modules/audio_output/jack.c
View file @
8fbafffc
...
...
@@ -300,9 +300,7 @@ int Process( jack_nframes_t i_frames, void *p_arg )
}
if
(
p_buffer
)
{
aout_BufferFree
(
p_buffer
);
}
block_Release
(
p_buffer
);
return
0
;
}
...
...
modules/audio_output/kai.c
View file @
8fbafffc
...
...
@@ -326,7 +326,7 @@ static ULONG APIENTRY KaiCallback( PVOID p_cb_data,
next_date
+=
p_aout_buffer
->
i_length
;
aout_BufferFre
e
(
p_aout_buffer
);
block_Releas
e
(
p_aout_buffer
);
}
else
{
...
...
modules/audio_output/oss.c
View file @
8fbafffc
...
...
@@ -558,7 +558,7 @@ static void OSSThreadCleanup( void *data )
{
oss_thread_ctx_t
*
p_ctx
=
data
;
if
(
p_ctx
->
p_buffer
)
aout_BufferFre
e
(
p_ctx
->
p_buffer
);
block_Releas
e
(
p_ctx
->
p_buffer
);
else
free
(
p_ctx
->
p_bytes
);
}
...
...
modules/audio_output/packet.c
View file @
8fbafffc
...
...
@@ -72,7 +72,7 @@ static void aout_FifoReset( aout_fifo_t * p_fifo )
while
(
p_buffer
!=
NULL
)
{
aout_buffer_t
*
p_next
=
p_buffer
->
p_next
;
aout_BufferFre
e
(
p_buffer
);
block_Releas
e
(
p_buffer
);
p_buffer
=
p_next
;
}
p_fifo
->
p_first
=
NULL
;
...
...
@@ -121,7 +121,7 @@ static void aout_FifoDestroy( aout_fifo_t * p_fifo )
while
(
p_buffer
!=
NULL
)
{
aout_buffer_t
*
p_next
=
p_buffer
->
p_next
;
aout_BufferFre
e
(
p_buffer
);
block_Releas
e
(
p_buffer
);
p_buffer
=
p_next
;
}
...
...
@@ -294,7 +294,7 @@ static block_t *aout_OutputSlice (audio_output_t *p_aout)
needed
-=
avail
;
p_out
+=
avail
;
/* Next buffer */
aout_BufferFre
e
(
aout_FifoPop
(
p_fifo
)
);
block_Releas
e
(
aout_FifoPop
(
p_fifo
)
);
}
}
else
...
...
modules/audio_output/waveout.c
View file @
8fbafffc
...
...
@@ -849,7 +849,7 @@ static int WaveOutClearDoneBuffers(aout_sys_t *p_sys)
sizeof
(
WAVEHDR
)
);
if
(
p_waveheader
[
i
].
dwUser
!=
1
)
aout_BufferFre
e
(
p_buffer
);
block_Releas
e
(
p_buffer
);
p_waveheader
[
i
].
dwUser
=
0
;
}
...
...
src/audio_output/dec.c
View file @
8fbafffc
...
...
@@ -271,7 +271,7 @@ block_t *aout_DecNewBuffer (audio_output_t *aout, size_t samples)
void
aout_DecDeleteBuffer
(
audio_output_t
*
aout
,
block_t
*
block
)
{
(
void
)
aout
;
aout_BufferFre
e
(
block
);
block_Releas
e
(
block
);
}
/*****************************************************************************
...
...
@@ -296,7 +296,7 @@ int aout_DecPlay (audio_output_t *p_aout, block_t *p_buffer, int i_input_rate)
if
(
unlikely
(
input
==
NULL
))
/* can happen due to restart */
{
aout_unlock
(
p_aout
);
aout_BufferFre
e
(
p_buffer
);
block_Releas
e
(
p_buffer
);
return
-
1
;
}
...
...
src/audio_output/input.c
View file @
8fbafffc
...
...
@@ -549,7 +549,7 @@ block_t *aout_InputPlay(audio_output_t *p_aout, aout_input_t *p_input,
static
void
inputDrop
(
aout_input_t
*
p_input
,
aout_buffer_t
*
p_buffer
)
{
aout_BufferFre
e
(
p_buffer
);
block_Releas
e
(
p_buffer
);
p_input
->
i_buffer_lost
++
;
}
...
...
src/input/decoder.c
View file @
8fbafffc
...
...
@@ -1163,7 +1163,7 @@ static void DecoderPlayAudio( decoder_t *p_dec, aout_buffer_t *p_audio,
{
msg_Warn
(
p_dec
,
"non-dated audio buffer received"
);
*
pi_lost_sum
+=
1
;
aout_BufferFre
e
(
p_audio
);
block_Releas
e
(
p_audio
);
return
;
}
...
...
@@ -1239,7 +1239,7 @@ static void DecoderPlayAudio( decoder_t *p_dec, aout_buffer_t *p_audio,
{
msg_Dbg
(
p_dec
,
"discarded audio buffer"
);
*
pi_lost_sum
+=
1
;
aout_BufferFre
e
(
p_audio
);
block_Releas
e
(
p_audio
);
}
if
(
!
b_has_more
)
...
...
@@ -1713,7 +1713,7 @@ static void DecoderFlushBuffering( decoder_t *p_dec )
p_owner
->
buffer
.
p_audio
=
p_audio
->
p_next
;
p_owner
->
buffer
.
i_count
--
;
aout_BufferFre
e
(
p_audio
);
block_Releas
e
(
p_audio
);
if
(
!
p_owner
->
buffer
.
p_audio
)
p_owner
->
buffer
.
pp_audio_next
=
&
p_owner
->
buffer
.
p_audio
;
...
...
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