[Common] Remove unnecessary init function call
authorSangjung Woo <sangjung.woo@samsung.com>
Fri, 8 Mar 2019 06:23:25 +0000 (15:23 +0900)
committerwooksong <wook16.song@samsung.com>
Mon, 11 Mar 2019 01:56:08 +0000 (10:56 +0900)
This patch removes the unnecessary gst_tensor_config_init() function call
since init function of each type (i.g. gst_tensor_config_from_[TYPE]_info())
calls gst_tensor_config_init() internally.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
gst/nnstreamer/tensor_common.c

index 541a70e..ebcb096 100644 (file)
@@ -874,8 +874,6 @@ gst_tensor_config_from_structure (GstTensorConfig * config,
   media_type m_type;
 
   g_return_val_if_fail (config != NULL, FALSE);
-  gst_tensor_config_init (config);
-
   g_return_val_if_fail (structure != NULL, FALSE);
 
   /* update config from tensor stream */
@@ -900,6 +898,7 @@ gst_tensor_config_from_structure (GstTensorConfig * config,
       gst_tensor_config_from_octet_stream_info (config, structure);
       break;
     default:
+      gst_tensor_config_init (config);
       GST_WARNING ("Unsupported type %d\n", m_type);
       return FALSE;
   }