]> git.sesse.net Git - casparcg/commitdiff
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
authorRonag <Ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 4 Aug 2011 08:55:15 +0000 (08:55 +0000)
committerRonag <Ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Thu, 4 Aug 2011 08:55:15 +0000 (08:55 +0000)
modules/ffmpeg/tbb_avcodec.cpp

index 2789fcbedea21fd3b4d5983384cd1530fe80f237..15d5a2598d308f5f0eacfa13856db44eccd848cc 100644 (file)
@@ -9,6 +9,7 @@
 \r
 #include <tbb/task.h>\r
 #include <tbb/atomic.h>\r
+#include <tbb/tbb_thread.h>\r
 \r
 #include <regex>\r
 #include <boost/algorithm/string.hpp>\r
@@ -42,6 +43,7 @@ int thread_execute2(AVCodecContext* s, int (*func)(AVCodecContext* c2, void* arg
        tbb::atomic<int> counter;   \r
     counter = 0;   \r
 \r
+       CASPAR_ASSERT(tbb::tbb_thread::hardware_concurrency() < 16);\r
        // Note: this will probably only work when tbb::task_scheduler_init::num_threads() < 16.\r
     tbb::parallel_for(tbb::blocked_range<int>(0, count, 2), [&](const tbb::blocked_range<int> &r)    \r
     {   \r