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

aout: add wait parameter to aout_DecFlush()

parent dce4c397
......@@ -139,7 +139,7 @@ void aout_DecDelete(audio_output_t *);
int aout_DecPlay(audio_output_t *, block_t *, int i_input_rate);
int aout_DecGetResetLost(audio_output_t *);
void aout_DecChangePause(audio_output_t *, bool b_paused, mtime_t i_date);
void aout_DecFlush(audio_output_t *);
void aout_DecFlush(audio_output_t *, bool wait);
bool aout_DecIsEmpty(audio_output_t *);
void aout_RequestRestart (audio_output_t *, unsigned);
......
......@@ -411,14 +411,14 @@ void aout_DecChangePause (audio_output_t *aout, bool paused, mtime_t date)
aout_OutputUnlock (aout);
}
void aout_DecFlush (audio_output_t *aout)
void aout_DecFlush (audio_output_t *aout, bool wait)
{
aout_owner_t *owner = aout_owner (aout);
aout_OutputLock (aout);
owner->sync.end = VLC_TS_INVALID;
if (owner->mixer_format.i_format)
aout_OutputFlush (aout, false);
aout_OutputFlush (aout, wait);
aout_OutputUnlock (aout);
}
......
......@@ -1152,7 +1152,7 @@ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
{
msg_Dbg( p_dec, "End of audio preroll" );
if( p_owner->p_aout )
aout_DecFlush( p_owner->p_aout );
aout_DecFlush( p_owner->p_aout, false );
/* */
p_owner->i_preroll_end = VLC_TS_INVALID;
}
......@@ -1218,7 +1218,7 @@ static void DecoderProcessAudio( decoder_t *p_dec, block_t *p_block, bool b_flus
}
if( b_flush && p_owner->p_aout )
aout_DecFlush( p_owner->p_aout );
aout_DecFlush( p_owner->p_aout, false );
}
static void DecoderPlaySpu( decoder_t *p_dec, subpicture_t *p_subpic )
......@@ -1642,7 +1642,7 @@ static void DeleteDecoder( decoder_t * p_dec )
if( p_owner->p_aout )
{
/* TODO: REVISIT gap-less audio */
aout_DecFlush( p_owner->p_aout );
aout_DecFlush( p_owner->p_aout, false );
aout_DecDelete( p_owner->p_aout );
input_resource_PutAout( p_owner->p_resource, p_owner->p_aout );
if( p_owner->p_input != NULL )
......
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