diff options
author | Shubhanshu Saxena <shubhanshu.e01@gmail.com> | 2022-03-02 23:35:56 +0530 |
---|---|---|
committer | Guo Yejun <yejun.guo@intel.com> | 2022-03-12 15:10:28 +0800 |
commit | d0a999a0ab8313fd1b5e9cb09e35fb769fb3e51c (patch) | |
tree | 7da55fe036df4955601d52dc13260ee2a60c380d /libavfilter/vf_dnn_processing.c | |
parent | 1df77bab08ac53482f94c4d4be2449cfa50b8e68 (diff) |
libavfilter: Remove DNNReturnType from DNN Module
This patch removes all occurences of DNNReturnType from the DNN module.
This commit replaces DNN_SUCCESS by 0 (essentially the same), so the
functions with DNNReturnType now return 0 in case of success, the negative
values otherwise.
Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
Diffstat (limited to 'libavfilter/vf_dnn_processing.c')
-rw-r--r-- | libavfilter/vf_dnn_processing.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/vf_dnn_processing.c b/libavfilter/vf_dnn_processing.c index 4a1ff5898f..cac096a19f 100644 --- a/libavfilter/vf_dnn_processing.c +++ b/libavfilter/vf_dnn_processing.c @@ -139,7 +139,7 @@ static int config_input(AVFilterLink *inlink) int check; result = ff_dnn_get_input(&ctx->dnnctx, &model_input); - if (result != DNN_SUCCESS) { + if (result != 0) { av_log(ctx, AV_LOG_ERROR, "could not get input from the model\n"); return result; } @@ -199,7 +199,7 @@ static int config_output(AVFilterLink *outlink) // have a try run in case that the dnn model resize the frame result = ff_dnn_get_output(&ctx->dnnctx, inlink->w, inlink->h, &outlink->w, &outlink->h); - if (result != DNN_SUCCESS) { + if (result != 0) { av_log(ctx, AV_LOG_ERROR, "could not get output from the model\n"); return result; } @@ -247,7 +247,7 @@ static int flush_frame(AVFilterLink *outlink, int64_t pts, int64_t *out_pts) DNNAsyncStatusType async_state; ret = ff_dnn_flush(&ctx->dnnctx); - if (ret != DNN_SUCCESS) { + if (ret != 0) { return -1; } @@ -296,7 +296,7 @@ static int activate(AVFilterContext *filter_ctx) return AVERROR(ENOMEM); } av_frame_copy_props(out, in); - if (ff_dnn_execute_model(&ctx->dnnctx, in, out) != DNN_SUCCESS) { + if (ff_dnn_execute_model(&ctx->dnnctx, in, out) != 0) { return AVERROR(EIO); } } |