mirror of https://code.videolan.org/videolan/vlc
alsa: fix a memory leak.
The thread can be canceled when owning a block_t, so we must push a way to clean it up.
This commit is contained in:
parent
7b6dc5d928
commit
cc5b3af019
|
@ -867,6 +867,7 @@ static void ALSAFill( aout_instance_t * p_aout )
|
|||
if( p_buffer == NULL )
|
||||
goto error;
|
||||
|
||||
block_cleanup_push( p_buffer );
|
||||
for (;;)
|
||||
{
|
||||
int n = snd_pcm_poll_descriptors_count(p_pcm);
|
||||
|
@ -912,7 +913,7 @@ static void ALSAFill( aout_instance_t * p_aout )
|
|||
msg_Err( p_aout, "cannot write: %s", snd_strerror( i_snd_rc ) );
|
||||
|
||||
vlc_restorecancel(canc);
|
||||
block_Release( p_buffer );
|
||||
vlc_cleanup_run();
|
||||
return;
|
||||
|
||||
error:
|
||||
|
|
Loading…
Reference in New Issue