vlc | branch: master | Francois Cartegnie <[email protected]> | Thu Feb 28 14:28:42 2019 +0100| [4bfd2cf0156562abba5713c37dfdf1451d1d044b] | committer: Francois Cartegnie
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) > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4bfd2cf0156562abba5713c37dfdf1451d1d044b --- modules/codec/avcodec/video.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c index 4f3c496c8a..26ecffcade 100644 --- a/modules/codec/avcodec/video.c +++ b/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 ); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
