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

aout: fix crash if output restart fails

parent f99bd91c
...@@ -65,6 +65,7 @@ audio_output_t *aout_New( vlc_object_t * p_parent ) ...@@ -65,6 +65,7 @@ audio_output_t *aout_New( vlc_object_t * p_parent )
owner->volume.multiplier = 1.0; owner->volume.multiplier = 1.0;
owner->volume.mixer = NULL; owner->volume.mixer = NULL;
aout->pf_play = aout_DecDeleteBuffer;
aout_VolumeNoneInit (aout); aout_VolumeNoneInit (aout);
vlc_object_set_destructor (aout, aout_Destructor); vlc_object_set_destructor (aout, aout_Destructor);
......
...@@ -195,31 +195,31 @@ int aout_OutputNew( audio_output_t *p_aout, ...@@ -195,31 +195,31 @@ int aout_OutputNew( audio_output_t *p_aout,
return 0; return 0;
} }
/***************************************************************************** /**
* aout_OutputDelete : delete the output * Destroys the audio output plug-in instance.
***************************************************************************** */
* This function is entered with the mixer lock. void aout_OutputDelete (audio_output_t *aout)
*****************************************************************************/
void aout_OutputDelete( audio_output_t * p_aout )
{ {
aout_owner_t *owner = aout_owner (p_aout); aout_owner_t *owner = aout_owner (aout);
aout_assert_locked( p_aout ); aout_assert_locked (aout);
if (owner->module == NULL) if (owner->module == NULL)
return; return;
module_unneed (p_aout, owner->module); module_unneed (aout, owner->module);
aout_VolumeNoneInit( p_aout ); /* clear volume callback */ /* Clear callbacks */
aout->pf_play = aout_DecDeleteBuffer; /* gruik */
aout->pf_pause = NULL;
aout->pf_flush = NULL;
aout_VolumeNoneInit (aout);
owner->module = NULL; owner->module = NULL;
aout_FiltersDestroyPipeline (owner->filters, owner->nb_filters); aout_FiltersDestroyPipeline (owner->filters, owner->nb_filters);
} }
/***************************************************************************** /**
* aout_OutputPlay : play a buffer * Plays a decoded audio buffer.
***************************************************************************** */
* This function is entered with the mixer lock.
*****************************************************************************/
void aout_OutputPlay (audio_output_t *aout, block_t *block) void aout_OutputPlay (audio_output_t *aout, block_t *block)
{ {
aout_owner_t *owner = aout_owner (aout); aout_owner_t *owner = aout_owner (aout);
......
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