summaryrefslogtreecommitdiff
path: root/libavcodec/pthread.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@google.com>2011-04-20 14:14:42 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2011-04-21 19:42:19 -0400
commit94f7451a3a5ad61cd49da0aa9f08cefe75482007 (patch)
treedde7d51bb68563d316ca285e19bd68fa326e925a /libavcodec/pthread.c
parent3283f274fdbef16d13df06661cec601e1bc01aab (diff)
Introduce slice threads flag.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r--libavcodec/pthread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index ba6e395d75..0311dcd7e9 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -877,7 +877,8 @@ static void validate_thread_parameters(AVCodecContext *avctx)
avctx->active_thread_type = 0;
} else if (frame_threading_supported && (avctx->thread_type & FF_THREAD_FRAME)) {
avctx->active_thread_type = FF_THREAD_FRAME;
- } else if (avctx->thread_type & FF_THREAD_SLICE) {
+ } else if (avctx->codec->capabilities & CODEC_CAP_SLICE_THREADS &&
+ avctx->thread_type & FF_THREAD_SLICE) {
avctx->active_thread_type = FF_THREAD_SLICE;
}
}