summaryrefslogtreecommitdiff
path: root/libavcodec/pthread.c
diff options
context:
space:
mode:
authorSean McGovern <gseanmcg@gmail.com>2012-03-19 01:08:14 -0400
committerDiego Biurrun <diego@biurrun.de>2012-05-07 10:35:01 +0200
commitb68c4ac2936c0e407da869a4f0919c26e2c16645 (patch)
tree214e1b79c1eb15497b955d44fc5cc2af2abc2090 /libavcodec/pthread.c
parenta07578f3f2a5ad5cd5dcc5de5ee173254f191435 (diff)
pthread: warn on high thread counts
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r--libavcodec/pthread.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 1889d2ae91..88d8ade57e 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -1015,6 +1015,11 @@ static void validate_thread_parameters(AVCodecContext *avctx)
avctx->thread_count = 1;
avctx->active_thread_type = 0;
}
+
+ if (avctx->thread_count > MAX_AUTO_THREADS)
+ av_log(avctx, AV_LOG_WARNING,
+ "Application has requested %d threads. Using a thread count greater than %d is not recommended.\n",
+ avctx->thread_count, MAX_AUTO_THREADS);
}
int ff_thread_init(AVCodecContext *avctx)