diff --git a/dom/media/platforms/agnostic/DAV1DDecoder.cpp b/dom/media/platforms/agnostic/DAV1DDecoder.cpp index 4118026c62..55ffbbebdf 100644 --- a/dom/media/platforms/agnostic/DAV1DDecoder.cpp +++ b/dom/media/platforms/agnostic/DAV1DDecoder.cpp @@ -36,13 +36,8 @@ RefPtr DAV1DDecoder::Init() { } else if (mInfo.mDisplay.width >= 1024) { decoder_threads = 4; } - settings.n_frame_threads = + settings.n_threads = static_cast(std::min(decoder_threads, GetNumberOfProcessors())); - // There is not much improvement with more than 2 tile threads at least with - // the content being currently served. The ideal number of tile thread would - // much the tile count of the content. Maybe dav1d can help to do that in the - // future. - settings.n_tile_threads = 2; int res = dav1d_open(&mContext, &settings); if (res < 0) { diff --git a/image/decoders/nsAVIFDecoder.cpp b/image/decoders/nsAVIFDecoder.cpp index 6481d0f10a..8aaa9cb6f1 100644 --- a/image/decoders/nsAVIFDecoder.cpp +++ b/image/decoders/nsAVIFDecoder.cpp @@ -347,6 +347,7 @@ class Dav1dDecoder final : AVIFDecoderInterface { Dav1dSettings settings; dav1d_default_settings(&settings); settings.all_layers = 0; + settings.max_frame_delay = 1; // TODO: tune settings a la DAV1DDecoder for AV1 (Bug 1681816) return dav1d_open(&mContext, &settings);