[FFmpeg-cvslog] threads: set thread_count to 1 when thread support is disabled

Janne Grunau git at videolan.org
Mon Jan 2 03:25:13 CET 2012


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Sun Jan  1 14:17:32 2012 +0100| [b6064d9a5970c3aed9284a272bdb288e3eb00990] | committer: Janne Grunau

threads: set thread_count to 1 when thread support is disabled

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b6064d9a5970c3aed9284a272bdb288e3eb00990
---

 libavcodec/utils.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index a88d1a7..c845a31 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",



More information about the ffmpeg-cvslog mailing list