1. check string len while checking data type.
2. unref pad instance in testcases.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
len = strlen (type_string);
+ if (len == 0) {
+ g_free (type_string);
+ return _NNS_END;
+ }
+
if (type_string[0] == 'u' || type_string[0] == 'U') {
/**
* Let's believe the developer and the following three letters are "int"
EXPECT_EQ (gst_tensor_get_type ("InT32"), _NNS_INT32);
EXPECT_EQ (gst_tensor_get_type ("InT322"), _NNS_END);
EXPECT_EQ (gst_tensor_get_type ("int3"), _NNS_END);
+ EXPECT_EQ (gst_tensor_get_type (""), _NNS_END);
}
/**
/** copy current caps */
g_test_data.current_caps = gst_caps_copy (caps);
gst_caps_unref (caps);
+ gst_object_unref (sink_pad);
}
}