[FFmpeg-devel] [PATCH 3/3] libavfilter/dnn: Initialze DNNData variables
wenbin.chen at intel.com
wenbin.chen at intel.com
Wed Sep 20 05:26:09 EEST 2023
From: Wenbin Chen <wenbin.chen at intel.com>
Signed-off-by: Wenbin Chen <wenbin.chen at intel.com>
---
libavfilter/dnn/dnn_backend_tf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c
index b521de7fbe..e1e8cef0d2 100644
--- a/libavfilter/dnn/dnn_backend_tf.c
+++ b/libavfilter/dnn/dnn_backend_tf.c
@@ -629,6 +629,7 @@ static int fill_model_input_tf(TFModel *tf_model, TFRequestItem *request) {
TFContext *ctx = &tf_model->ctx;
int ret = 0;
+ memset(&input, 0, sizeof(input));
lltask = ff_queue_pop_front(tf_model->lltask_queue);
av_assert0(lltask);
task = lltask->task;
@@ -724,7 +725,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;
--
2.34.1
More information about the ffmpeg-devel
mailing list