avcodec/libdav1d: let libdav1d choose optimal max frame delay

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2021-09-21 15:07:20 -03:00
parent 85413a5ae6
commit 9a7fe439d9
1 changed files with 1 additions and 1 deletions

View File

@ -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