Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -678,12 +678,6 @@ DNNReturnType ff_dnn_execute_model_async_ov(const DNNModel *model, const char *i · 677 unmodified lines | |||
| 678 | return DNN_ERROR; | 678 | return DNN_ERROR; |
| 679 | } | 679 | } |
| 680 | 680 | ||
| 681 | task = av_malloc(sizeof(*task)); | ||
| 682 | if (!task) { | ||
| 683 | av_log(ctx, AV_LOG_ERROR, "unable to alloc memory for task item.\n"); | ||
| 684 | return DNN_ERROR; | ||
| 685 | } | ||
| 686 | |||
| 687 | if (!ov_model->exe_network) { | 681 | if (!ov_model->exe_network) { |
| 688 | if (init_model_ov(ov_model, input_name, output_names[0]) != DNN_SUCCESS) { | 682 | if (init_model_ov(ov_model, input_name, output_names[0]) != DNN_SUCCESS) { |
| 689 | av_log(ctx, AV_LOG_ERROR, "Failed init OpenVINO exectuable network or inference request\n"); | 683 | av_log(ctx, AV_LOG_ERROR, "Failed init OpenVINO exectuable network or inference request\n"); |
| @@ -691,6 +685,12 @@ DNNReturnType ff_dnn_execute_model_async_ov(const DNNModel *model, const char *i · 1 unmodified line | |||
| 691 | } | 685 | } |
| 692 | } | 686 | } |
| 693 | 687 | ||
| 688 | task = av_malloc(sizeof(*task)); | ||
| 689 | if (!task) { | ||
| 690 | av_log(ctx, AV_LOG_ERROR, "unable to alloc memory for task item.\n"); | ||
| 691 | return DNN_ERROR; | ||
| 692 | } | ||
| 693 | |||
| 694 | task->done = 0; | 694 | task->done = 0; |
| 695 | task->do_ioproc = 1; | 695 | task->do_ioproc = 1; |
| 696 | task->async = 1; | 696 | task->async = 1; |