[FFmpeg-cvslog] pthread: warn on high thread counts
Sean McGovern
git at videolan.org
Mon May 7 23:06:25 CEST 2012
ffmpeg | branch: master | Sean McGovern <gseanmcg at gmail.com> | Mon Mar 19 01:08:14 2012 -0400| [b68c4ac2936c0e407da869a4f0919c26e2c16645] | committer: Diego Biurrun
pthread: warn on high thread counts
Signed-off-by: Diego Biurrun <diego at biurrun.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b68c4ac2936c0e407da869a4f0919c26e2c16645
---
libavcodec/pthread.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 1889d2a..88d8ade 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)
More information about the ffmpeg-cvslog
mailing list