diff options
author | Janne Grunau <janne-libav@jannau.net> | 2011-12-21 13:07:54 +0100 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2011-12-22 21:50:07 +0100 |
commit | f77f640b3035d357a6c6ffcea243c7ea0d8ebc67 (patch) | |
tree | 608643aaf617afc139a7fb6b40a2b7e4408f0026 /libavcodec | |
parent | fede015468e696b0dad01a03f6628c1a4cae955e (diff) | |
download | ffmpeg-f77f640b3035d357a6c6ffcea243c7ea0d8ebc67.tar.gz |
pthreads: reset active_thread_type when slice thread_init returrns early
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/pthread.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index 7e03c64f40..ac15fefd68 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -237,8 +237,10 @@ static int thread_init(AVCodecContext *avctx) ThreadContext *c; int thread_count = avctx->thread_count; - if (thread_count <= 1) + if (thread_count <= 1) { + avctx->active_thread_type = 0; return 0; + } c = av_mallocz(sizeof(ThreadContext)); if (!c) |