Commit 499a2fea authored by Gildas Bazin's avatar Gildas Bazin

*...

* modules/audio_filter/converter/dtstofloat32.c,a52tofloat32.c,mpgatofixed32.c: release the old audio buffer after conversion.
parent 2d43c89f
......@@ -461,8 +461,15 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
aout_filter_t aout_filter;
aout_buffer_t in_buf, out_buf;
block_t *p_out;
int i_out_size;
int i_out_size = p_block->i_samples *
if( !p_block || !p_block->i_samples )
{
if( p_block ) p_block->pf_release( p_block );
return NULL;
}
i_out_size = p_block->i_samples *
p_filter->fmt_out.audio.i_bitspersample *
p_filter->fmt_out.audio.i_channels;
......@@ -470,6 +477,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
if( !p_out )
{
msg_Warn( p_filter, "can't get output buffer" );
p_block->pf_release( p_block );
return NULL;
}
......@@ -495,5 +503,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
p_out->i_buffer = out_buf.i_nb_bytes;
p_block->pf_release( p_block );
return p_out;
}
......@@ -445,8 +445,15 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
aout_filter_t aout_filter;
aout_buffer_t in_buf, out_buf;
block_t *p_out;
int i_out_size;
int i_out_size = p_block->i_samples *
if( !p_block || !p_block->i_samples )
{
if( p_block ) p_block->pf_release( p_block );
return NULL;
}
i_out_size = p_block->i_samples *
p_filter->fmt_out.audio.i_bitspersample *
p_filter->fmt_out.audio.i_channels;
......@@ -454,6 +461,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
if( !p_out )
{
msg_Warn( p_filter, "can't get output buffer" );
p_block->pf_release( p_block );
return NULL;
}
......@@ -480,5 +488,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
p_out->i_buffer = out_buf.i_nb_bytes;
p_out->i_samples = out_buf.i_nb_samples;
p_block->pf_release( p_block );
return p_out;
}
......@@ -289,8 +289,15 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
aout_filter_t aout_filter;
aout_buffer_t in_buf, out_buf;
block_t *p_out;
int i_out_size;
int i_out_size = p_block->i_samples *
if( !p_block || !p_block->i_samples )
{
if( p_block ) p_block->pf_release( p_block );
return NULL;
}
i_out_size = p_block->i_samples *
p_filter->fmt_out.audio.i_bitspersample *
p_filter->fmt_out.audio.i_channels;
......@@ -298,6 +305,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
if( !p_out )
{
msg_Warn( p_filter, "can't get output buffer" );
p_block->pf_release( p_block );
return NULL;
}
......@@ -321,5 +329,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
DoWork( (aout_instance_t *)p_filter, &aout_filter, &in_buf, &out_buf );
p_block->pf_release( p_block );
return p_out;
}
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