Add comment on incrementing p_mt_info->num_workers In av1_create_workers(), it is important to increment p_mt_info->num_workers in the for loop that creates the worker threads, so that av1_terminate_workers() still works after a partial failure. Add a comment to explain this. Change-Id: I55c7fa341d32b577c89104733cbe8da78a8a0d76
diff --git a/av1/encoder/ethread.c b/av1/encoder/ethread.c index 636a418..0422856 100644 --- a/av1/encoder/ethread.c +++ b/av1/encoder/ethread.c
@@ -1117,6 +1117,8 @@ } winterface->sync(worker); + // Ensure p_mt_info->num_workers is the number of threads successfuly + // created. Important to av1_terminate_workers(). ++p_mt_info->num_workers; } }