From 9a7fe439d969485de698569faa0b42e948cbd753 Mon Sep 17 00:00:00 2001 From: James Almer Date: Tue, 21 Sep 2021 15:07:20 -0300 Subject: [PATCH] avcodec/libdav1d: let libdav1d choose optimal max frame delay Signed-off-by: James Almer --- libavcodec/libdav1d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index e4fdaf7229..2807210e50 100644 --- a/libavcodec/libdav1d.c +++ b/libavcodec/libdav1d.c @@ -237,7 +237,7 @@ static av_cold int libdav1d_init(AVCodecContext *c) s.n_threads = FFMAX(dav1d->frame_threads, dav1d->tile_threads); else s.n_threads = FFMIN(threads, DAV1D_MAX_THREADS); - s.max_frame_delay = (c->flags & AV_CODEC_FLAG_LOW_DELAY) ? 1 : s.n_threads; + s.max_frame_delay = (c->flags & AV_CODEC_FLAG_LOW_DELAY) ? 1 : 0; av_log(c, AV_LOG_DEBUG, "Using %d threads, %d max_frame_delay\n", s.n_threads, s.max_frame_delay); #else