Browse Source

es_out: use vlc_input_decoder_IsDrained() when applicable

pull/192/head
Thomas Guillem 9 months ago
committed by Steve Lhomme
parent
commit
bd68f98920
  1. 4
      src/input/es_out.c
  2. 7
      src/input/test/es_out.c

4
src/input/es_out.c

@ -3090,8 +3090,8 @@ EsOutDrainDecoder(es_out_sys_t *p_sys, es_out_id_t *es, bool wait)
* bit too long if the ES is deleted in the middle of a stream. */
while( !input_Stopped(p_sys->p_input) && !p_sys->b_buffering )
{
if( vlc_input_decoder_IsEmpty( es->p_dec ) &&
( !es->p_dec_record || vlc_input_decoder_IsEmpty( es->p_dec_record ) ))
if( vlc_input_decoder_IsDrained( es->p_dec ) &&
( !es->p_dec_record || vlc_input_decoder_IsDrained( es->p_dec_record ) ))
break;
/* FIXME there should be a way to have auto deleted es, but there will be
* a problem when another codec of the same type is created (mainly video) */

7
src/input/test/es_out.c

@ -138,12 +138,17 @@ void vlc_input_decoder_StopWait(vlc_input_decoder_t *owner)
owner->started = true;
}
bool vlc_input_decoder_IsEmpty(vlc_input_decoder_t *owner)
bool vlc_input_decoder_IsDrained(vlc_input_decoder_t *owner)
{
(void)owner;
return owner->drained;
}
bool vlc_input_decoder_IsEmpty(vlc_input_decoder_t *owner)
{
return vlc_input_decoder_IsDrained(owner);
}
void vlc_input_decoder_DecodeWithStatus(
vlc_input_decoder_t *owner,
vlc_frame_t *frame,

Loading…
Cancel
Save