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>
pull/388/head
Saliev, Rafik F 2 years ago committed by Guo Yejun
parent 10a56363a7
commit 8ad988ac37
  1. 2
      libavfilter/dnn/dnn_backend_openvino.c

@ -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);

Loading…
Cancel
Save