[FFmpeg-devel,1/2] libavfilter/dnn/dnn_backend_tf: fix typo that variable uninitialized.

Submitted by Guo, Yejun on Aug. 14, 2019, 7:05 a.m.

Details

Message ID 1565766353-31002-1-git-send-email-yejun.guo@intel.com
State Accepted
Commit 29aeeb3e3e7b21a56ff4b1684fb65fa242a66c8d
Headers show

Commit Message

Guo, Yejun Aug. 14, 2019, 7:05 a.m.
if it is not initialized with zero, the tensorflow lib will report
error message such as:
Attempt to add output -7920 of depth_to_space4 not in range [0, 1) to node with type Identity

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
---
 libavfilter/dnn/dnn_backend_tf.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c
index ba959ae..ca7434a 100644
--- a/libavfilter/dnn/dnn_backend_tf.c
+++ b/libavfilter/dnn/dnn_backend_tf.c
@@ -490,6 +490,7 @@  static DNNReturnType load_native_model(TFModel *tf_model, const char *model_file
 
     op_desc = TF_NewOperation(tf_model->graph, "Identity", "y");
     input.oper = op;
+    input.index = 0;
     TF_AddInput(op_desc, input);
     TF_FinishOperation(op_desc, tf_model->status);
     if (TF_GetCode(tf_model->status) != TF_OK){