Browse Source

codec: videotoolbox: ensure flush on request

Francois Cartegnie 4 years ago
committed by Alexandre Janniaux
parent
commit
dd5abd4cc8
  1. 13
      modules/codec/videotoolbox/decoder.c

13
modules/codec/videotoolbox/decoder.c

@ -1784,11 +1784,8 @@ static int HandleVTStatus(decoder_t *p_dec, OSStatus status,
static void RequestFlush(decoder_t *p_dec)
{
decoder_sys_t *p_sys = p_dec->p_sys;
vlc_mutex_lock(&p_sys->lock);
p_sys->b_discard_decoder_output = true;
vlc_mutex_unlock(&p_sys->lock);
Drain(p_dec, true);
PtsInit(p_dec);
}
static void Drain(decoder_t *p_dec, bool flush)
@ -1816,12 +1813,6 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
{
decoder_sys_t *p_sys = p_dec->p_sys;
if (p_sys->b_discard_decoder_output)
{
Drain(p_dec, true);
PtsInit(p_dec);
}
if (p_block == NULL)
{
Drain(p_dec, false);

Loading…
Cancel
Save