Commit ab625e9f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove unused/unusable decoder_DeleteAudioBuffer()

Audio buffers are destroyed downstream of the decoder, so this
function could never be used. In practice, the audio filters, the
audio output (or the encoder) already use block_Release() to delete
buffers allocated with decoder_NewAudioBuffer().

If "direct rendering" is ever implemented in audio output,
block_Release() custom buffer deletion can be used.
parent cf1498fb
......@@ -105,7 +105,6 @@ struct decoder_t
/* Audio output callbacks
* XXX use decoder_NewAudioBuffer/decoder_DeleteAudioBuffer */
aout_buffer_t *(*pf_aout_buffer_new)( decoder_t *, int );
void (*pf_aout_buffer_del)( decoder_t *, aout_buffer_t * );
/* SPU output callbacks
* XXX use decoder_NewSubpicture and decoder_DeleteSubpicture */
......@@ -206,11 +205,6 @@ VLC_API void decoder_UnlinkPicture( decoder_t *, picture_t * );
*/
VLC_API aout_buffer_t * decoder_NewAudioBuffer( decoder_t *, int i_size ) VLC_USED;
/**
* This function will release a audio buffer created by decoder_NewAudioBuffer.
*/
VLC_API void decoder_DeleteAudioBuffer( decoder_t *, aout_buffer_t *p_buffer );
/**
* This function will return a new subpicture usable by a decoder as an output
* buffer. You have to release it using decoder_DeleteSubpicture or by returning
......
......@@ -94,12 +94,6 @@ static aout_buffer_t *audio_new_buffer( decoder_t *p_dec, int i_samples )
return p_block;
}
static void audio_del_buffer( decoder_t *p_dec, aout_buffer_t *p_buffer )
{
VLC_UNUSED(p_dec);
block_Release( p_buffer );
}
static int transcode_audio_filter_allocation_init( filter_t *p_filter,
void *data )
{
......@@ -224,7 +218,6 @@ int transcode_audio_new( sout_stream_t *p_stream,
id->p_decoder->fmt_out.p_extra = 0;
id->p_decoder->pf_decode_audio = NULL;
id->p_decoder->pf_aout_buffer_new = audio_new_buffer;
id->p_decoder->pf_aout_buffer_del = audio_del_buffer;
/* id->p_decoder->p_cfg = p_sys->p_audio_cfg; */
id->p_decoder->p_module =
......
......@@ -213,10 +213,6 @@ aout_buffer_t *decoder_NewAudioBuffer( decoder_t *p_decoder, int i_size )
return NULL;
return p_decoder->pf_aout_buffer_new( p_decoder, i_size );
}
void decoder_DeleteAudioBuffer( decoder_t *p_decoder, aout_buffer_t *p_buffer )
{
p_decoder->pf_aout_buffer_del( p_decoder, p_buffer );
}
subpicture_t *decoder_NewSubpicture( decoder_t *p_decoder,
const subpicture_updater_t *p_dyn )
......@@ -800,7 +796,6 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
/* Set buffers allocation callbacks for the decoders */
p_dec->pf_aout_buffer_new = aout_new_buffer;
p_dec->pf_aout_buffer_del = aout_del_buffer;
p_dec->pf_vout_buffer_new = vout_new_buffer;
p_dec->pf_vout_buffer_del = vout_del_buffer;
p_dec->pf_picture_link = vout_link_picture;
......@@ -2315,13 +2310,6 @@ static aout_buffer_t *aout_new_buffer( decoder_t *p_dec, int i_samples )
return p_buffer;
}
static void aout_del_buffer( decoder_t *p_dec, aout_buffer_t *p_buffer )
{
decoder_owner_sys_t *p_owner = p_dec->p_owner;
aout_DecDeleteBuffer( p_owner->p_aout, p_buffer );
}
static picture_t *vout_new_buffer( decoder_t *p_dec )
{
decoder_owner_sys_t *p_owner = p_dec->p_owner;
......
......@@ -80,7 +80,6 @@ date_Increment
date_Init
date_Move
date_Set
decoder_DeleteAudioBuffer
decoder_DeletePicture
decoder_DeleteSubpicture
decoder_GetDisplayDate
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment