diff options
author | Zhao Zhili <[email protected]> | 2024-05-08 00:08:17 +0800 |
---|---|---|
committer | Guo Yejun <[email protected]> | 2024-05-30 18:14:31 +0800 |
commit | 6de951923b2daed1d3a045522597888f5b9db53f (patch) | |
tree | da01a1261d2b68693a3e088d53478d4de6c8ba6c /libavfilter/dnn_filter_common.c | |
parent | a1fea7e11b8ee3c4a5afff5d3b6c66326a32782d (diff) |
avfilter/dnn: Remove a level of dereference
For code such as 'model->model = ov_model' is confusing. We can
just drop the member variable and use cast to get the subclass.
Signed-off-by: Zhao Zhili <[email protected]>
Reviewed-by: Wenbin Chen <[email protected]>
Reviewed-by: Guo Yejun <[email protected]>
Diffstat (limited to 'libavfilter/dnn_filter_common.c')
-rw-r--r-- | libavfilter/dnn_filter_common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/dnn_filter_common.c b/libavfilter/dnn_filter_common.c index 860ca7591f..6b9c6f8d7f 100644 --- a/libavfilter/dnn_filter_common.c +++ b/libavfilter/dnn_filter_common.c @@ -157,15 +157,15 @@ int ff_dnn_set_classify_post_proc(DnnContext *ctx, ClassifyPostProc post_proc) int ff_dnn_get_input(DnnContext *ctx, DNNData *input) { - return ctx->model->get_input(ctx->model->model, input, ctx->model_inputname); + return ctx->model->get_input(ctx->model, input, ctx->model_inputname); } int ff_dnn_get_output(DnnContext *ctx, int input_width, int input_height, int *output_width, int *output_height) { char * output_name = ctx->model_outputnames && ctx->backend_type != DNN_TH ? ctx->model_outputnames[0] : NULL; - return ctx->model->get_output(ctx->model->model, ctx->model_inputname, input_width, input_height, - (const char *)output_name, output_width, output_height); + return ctx->model->get_output(ctx->model, ctx->model_inputname, input_width, input_height, + (const char *)output_name, output_width, output_height); } int ff_dnn_execute_model(DnnContext *ctx, AVFrame *in_frame, AVFrame *out_frame) |