summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2012-01-01 14:17:32 +0100
committerJanne Grunau <janne-libav@jannau.net>2012-01-01 14:37:38 +0100
commitb6064d9a5970c3aed9284a272bdb288e3eb00990 (patch)
treeef0b704496226d0b159fcee53218b759adf80e45 /libavcodec/utils.c
parentb4d44a45f9aa43bd2e5bddde33e3b37802607b0a (diff)
threads: set thread_count to 1 when thread support is disabled
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",