libavfilter/dnn: fix openvino async mode

Bugfix: The OpenVino DNN backend in the 'async' mode sets
'task->inference_done' to 'complete' prior to data copy from
OpenVino output buffer to task's output frame.
This order causes task destroy in ff_dnn_get_result_common()
prior to model output processing.

Signed-off-by: Rafik Saliev <rafik.f.saliev@intel.com>
This commit is contained in:
Saliev, Rafik F 2022-12-16 09:37:27 +00:00 committed by Guo Yejun
parent 10a56363a7
commit 8ad988ac37
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,6 @@ static void infer_completion_callback(void *args)
av_assert0(request->lltask_count >= 1);
for (int i = 0; i < request->lltask_count; ++i) {
task = request->lltasks[i]->task;
task->inference_done++;
switch (ov_model->model->func_type) {
case DFT_PROCESS_FRAME:
@ -278,6 +277,7 @@ static void infer_completion_callback(void *args)
break;
}
task->inference_done++;
av_freep(&request->lltasks[i]);
output.data = (uint8_t *)output.data
+ output.width * output.height * output.channels * get_datatype_size(output.dt);