summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index a88d1a7229..c845a310cd 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -710,6 +710,8 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
goto free_and_end;
}
}
+ if (!HAVE_THREADS && !(codec->capabilities & CODEC_CAP_AUTO_THREADS))
+ avctx->thread_count = 1;
if (avctx->codec->max_lowres < avctx->lowres) {
av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n",