avfilter/dnn_backend_openvino: reduce indentation in free_model_ov
No functional changes except ensures model isn't null. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
parent
5369548f2e
commit
7cb6329296
@ -463,8 +463,12 @@ static void infer_completion_callback(void *args)
|
|||||||
|
|
||||||
static void dnn_free_model_ov(DNNModel **model)
|
static void dnn_free_model_ov(DNNModel **model)
|
||||||
{
|
{
|
||||||
if (*model){
|
OVModel *ov_model;
|
||||||
OVModel *ov_model = (*model)->model;
|
|
||||||
|
if (!model || !*model)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ov_model = (*model)->model;
|
||||||
while (ff_safe_queue_size(ov_model->request_queue) != 0) {
|
while (ff_safe_queue_size(ov_model->request_queue) != 0) {
|
||||||
OVRequestItem *item = ff_safe_queue_pop_front(ov_model->request_queue);
|
OVRequestItem *item = ff_safe_queue_pop_front(ov_model->request_queue);
|
||||||
if (item && item->infer_request) {
|
if (item && item->infer_request) {
|
||||||
@ -515,7 +519,6 @@ static void dnn_free_model_ov(DNNModel **model)
|
|||||||
av_freep(&ov_model);
|
av_freep(&ov_model);
|
||||||
av_freep(model);
|
av_freep(model);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int init_model_ov(OVModel *ov_model, const char *input_name, const char *output_name)
|
static int init_model_ov(OVModel *ov_model, const char *input_name, const char *output_name)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user