Browse Source

codec: avcodec: handle low delay mode

Frame threading mode only creates high latency.
Speeds up by 6 frames duration on 60 fps mode (250->150ms)
pull/85/head
Francois Cartegnie 7 years ago
parent
commit
4bfd2cf015
  1. 6
      modules/codec/avcodec/video.c

6
modules/codec/avcodec/video.c

@ -479,6 +479,12 @@ static int OpenVideoCodec( decoder_t *p_dec )
ctx->flags |= AV_CODEC_FLAG_LOW_DELAY;
}
if( var_InheritBool(p_dec, "low-delay") )
{
ctx->flags |= AV_CODEC_FLAG_LOW_DELAY;
ctx->active_thread_type = FF_THREAD_SLICE;
}
post_mt( p_sys );
ret = ffmpeg_OpenCodec( p_dec, ctx, codec );
wait_mt( p_sys );

Loading…
Cancel
Save