summaryrefslogtreecommitdiffstats
path: root/libavcodec/w32thread.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-06-18 21:59:11 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-06-19 03:54:15 +0200
commit0aed4f81fe5b9b15ab9b35baa4300f29ab03d65f (patch)
tree247d6638ccd3fd771e85e493f03b97b36df59242 /libavcodec/w32thread.c
parent035c13e307daeb2a250b86f0ddef3b783a6393e5 (diff)
downloadffmpeg-streaming-0aed4f81fe5b9b15ab9b35baa4300f29ab03d65f.zip
ffmpeg-streaming-0aed4f81fe5b9b15ab9b35baa4300f29ab03d65f.tar.gz
w32threads: with only 1 thread there cant be a active threading mode.
Fixes ticket284 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/w32thread.c')
-rw-r--r--libavcodec/w32thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/w32thread.c b/libavcodec/w32thread.c
index 7c4c760..501f0ce 100644
--- a/libavcodec/w32thread.c
+++ b/libavcodec/w32thread.c
@@ -135,11 +135,11 @@ int ff_thread_init(AVCodecContext *s){
return 0;
}
- s->active_thread_type= FF_THREAD_SLICE;
-
if (s->thread_count <= 1)
return 0;
+ s->active_thread_type= FF_THREAD_SLICE;
+
assert(!s->thread_opaque);
c= av_mallocz(sizeof(ThreadContext)*s->thread_count);
s->thread_opaque= c;
OpenPOWER on IntegriCloud