X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Flibaomdec.c;h=a72ac984e72a9f7ea24227d79c1d9ce9f66e975c;hb=44085b9951b06df1cab4105dcda004213988d84f;hp=6a2de6d47a760431982e02818454c302de22d502;hpb=fb4a12cda4033f2f3d3d1039739f6e0e6f9afb82;p=ffmpeg diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c index 6a2de6d47a7..a72ac984e72 100644 --- a/libavcodec/libaomdec.c +++ b/libavcodec/libaomdec.c @@ -42,8 +42,7 @@ static av_cold int aom_init(AVCodecContext *avctx, { AV1DecodeContext *ctx = avctx->priv_data; struct aom_codec_dec_cfg deccfg = { - /* token partitions+1 would be a decent choice */ - .threads = FFMIN(avctx->thread_count, 16) + .threads = FFMIN(avctx->thread_count ? avctx->thread_count : av_cpu_count(), 16) }; av_log(avctx, AV_LOG_INFO, "%s\n", aom_codec_version_str());