Do not cast worker->hook function pointers.
I found the function pointer casts fixed in this CL by searching for
"hook = (" and "(AVxWorkerHook)" in the libaom source tree.
BUG=aomedia:2156
BUG=chromium:883004
Change-Id: I1cd705b9d95398986434c0049c80f45dfa996683
diff --git a/av1/encoder/ethread.c b/av1/encoder/ethread.c
index 6917c2f..e8ac30b 100644
--- a/av1/encoder/ethread.c
+++ b/av1/encoder/ethread.c
@@ -27,7 +27,8 @@
td->rd_counts.skip_mode_used_flag |= td_t->rd_counts.skip_mode_used_flag;
}
-static int enc_worker_hook(EncWorkerData *const thread_data, void *unused) {
+static int enc_worker_hook(void *arg1, void *unused) {
+ EncWorkerData *const thread_data = (EncWorkerData *)arg1;
AV1_COMP *const cpi = thread_data->cpi;
const AV1_COMMON *const cm = &cpi->common;
const int tile_cols = cm->tile_cols;
@@ -241,7 +242,7 @@
} else {
num_workers = AOMMIN(num_workers, cpi->num_workers);
}
- prepare_enc_workers(cpi, (AVxWorkerHook)enc_worker_hook, num_workers);
+ prepare_enc_workers(cpi, enc_worker_hook, num_workers);
launch_enc_workers(cpi, num_workers);
sync_enc_workers(cpi, num_workers);
accumulate_counters_enc_workers(cpi, num_workers);