summaryrefslogtreecommitdiff
path: root/libavcodec/pthread.c
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2011-12-21 13:07:54 +0100
committerJanne Grunau <janne-libav@jannau.net>2011-12-22 21:50:07 +0100
commitf77f640b3035d357a6c6ffcea243c7ea0d8ebc67 (patch)
tree608643aaf617afc139a7fb6b40a2b7e4408f0026 /libavcodec/pthread.c
parentfede015468e696b0dad01a03f6628c1a4cae955e (diff)
pthreads: reset active_thread_type when slice thread_init returrns early
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r--libavcodec/pthread.c4
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)