]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libaomdec.c
Merge commit '8629149816930a43bf5a66b11c6224446cabd044'
[ffmpeg] / libavcodec / libaomdec.c
index 6a2de6d47a760431982e02818454c302de22d502..a72ac984e72a9f7ea24227d79c1d9ce9f66e975c 100644 (file)
@@ -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());