aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWenbin Chen <wenbin.chen@intel.com>2023-09-21 09:26:33 +0800
committerGuo Yejun <yejun.guo@intel.com>2023-09-27 12:58:55 +0800
commit58b6c0c327ab9b49e177694ac02fd8d782e20a4a (patch)
treeb527dc04a18d909269f1bdf250a579008c926083
parentc8c925dc2920efccfb90deaf27a56e7b673cc54c (diff)
downloadffmpeg-58b6c0c327ab9b49e177694ac02fd8d782e20a4a.tar.gz
libavfilter/dnn: Initialze DNNData variables
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
-rw-r--r--libavfilter/dnn/dnn_backend_tf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c
index b521de7fbe..25046b58d9 100644
--- a/libavfilter/dnn/dnn_backend_tf.c
+++ b/libavfilter/dnn/dnn_backend_tf.c
@@ -622,7 +622,7 @@ err:
}
static int fill_model_input_tf(TFModel *tf_model, TFRequestItem *request) {
- DNNData input;
+ DNNData input = { 0 };
LastLevelTaskItem *lltask;
TaskItem *task;
TFInferRequest *infer_request = NULL;
@@ -724,7 +724,7 @@ static void infer_completion_callback(void *args) {
TFModel *tf_model = task->model;
TFContext *ctx = &tf_model->ctx;
- outputs = av_malloc_array(task->nb_output, sizeof(*outputs));
+ outputs = av_calloc(task->nb_output, sizeof(*outputs));
if (!outputs) {
av_log(ctx, AV_LOG_ERROR, "Failed to allocate memory for *outputs\n");
goto err;