From cc33e73618a981de7fd96385ecb34719de031f16 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 (cherry picked from commit 9a7fe439d969485de698569faa0b42e948cbd753) --- libavcodec/libdav1d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index ac9214c830..305e04cef7 100644 --- a/libavcodec/libdav1d.c +++ b/libavcodec/libdav1d.c @@ -157,7 +157,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