Browse Source

decoder: notify when next-frame reaches EOF

pull/193/head
Thomas Guillem 8 months ago
committed by Jean-Baptiste Kempf
parent
commit
26d3ca6e6e
  1. 19
      src/input/decoder.c

19
src/input/decoder.c

@ -1926,6 +1926,17 @@ static void DecoderThread_Flush( vlc_input_decoder_t *p_owner )
static void Decoder_VideoDrained(vlc_input_decoder_t *owner)
{
owner->video.drained = true;
if (owner->frames_countdown > 0)
{
if (unlikely(vout_IsEmpty(owner->video.vout)))
{
/* Unlikely case where all pictures are already sent to the vout
* next queue while draining. This could happen with a burst of
* next-frame request near EOF. */
owner->frames_countdown = 0;
decoder_Notify(owner, frame_next_status, -EAGAIN);
}
}
}
/**
@ -2938,6 +2949,14 @@ void vlc_input_decoder_FrameNext( vlc_input_decoder_t *p_owner )
return;
}
if( p_owner->video.drained && vout_IsEmpty( p_owner->video.vout ) )
{
p_owner->frames_countdown = 0;
decoder_Notify( p_owner, frame_next_status, -EAGAIN );
vlc_fifo_Unlock( p_owner->p_fifo );
return;
}
StopFrameNextLocked( p_owner );
if (!p_owner->output_paused)

Loading…
Cancel
Save