diff options
author | Alexander Strange <astrange@ithinksw.com> | 2011-02-08 05:15:44 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-11 04:53:58 +0300 |
commit | b38f008ea64cc5c0087fc9804569338ef005897c (patch) | |
tree | 010130d14be559e429b24181c83cd5bade94909c /libavcodec/w32thread.c | |
parent | 8a278ad30d6f9a428c71dfab5bd6fe68d4717094 (diff) |
Frame-based multithreading framework using pthreads
See doc/multithreading.txt for details on use in codecs.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/w32thread.c')
-rw-r--r-- | libavcodec/w32thread.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/w32thread.c b/libavcodec/w32thread.c index f7a1430647..007508e409 100644 --- a/libavcodec/w32thread.c +++ b/libavcodec/w32thread.c @@ -129,7 +129,13 @@ int avcodec_thread_init(AVCodecContext *s, int thread_count){ ThreadContext *c; uint32_t threadid; + if(!(s->thread_type & FF_THREAD_SLICE)){ + av_log(s, AV_LOG_WARNING, "The requested thread algorithm is not supported with this thread library.\n"); + return 0; + } + s->thread_count= thread_count; + s->active_thread_type= FF_THREAD_SLICE; if (thread_count <= 1) return 0; |