From 090f35b316d55bef26714c184e1d6b02fd904da2 Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Tue, 2 Apr 2019 19:06:40 +0900 Subject: [PATCH] [Common] Add other/tensors parsing rule. dimensions and types are not deliminated by both '.' and ','. It is to support GstCap (CapsFilter) with other/tensors string expressions. Note that ... ! other/tensors,types=float32,int32 !... is not supported. We need to use . instead in such cases. Signed-off-by: MyungJoo Ham --- gst/nnstreamer/tensor_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/nnstreamer/tensor_common.c b/gst/nnstreamer/tensor_common.c index 2d092c6..92cc4b2 100644 --- a/gst/nnstreamer/tensor_common.c +++ b/gst/nnstreamer/tensor_common.c @@ -326,7 +326,7 @@ gst_tensors_info_parse_dimensions_string (GstTensorsInfo * info, guint i; gchar **str_dims; - str_dims = g_strsplit (dim_string, ",", -1); + str_dims = g_strsplit_set (dim_string, ",.", -1); num_dims = g_strv_length (str_dims); if (num_dims > NNS_TENSOR_SIZE_LIMIT) { @@ -364,7 +364,7 @@ gst_tensors_info_parse_types_string (GstTensorsInfo * info, guint i; gchar **str_types; - str_types = g_strsplit (type_string, ",", -1); + str_types = g_strsplit_set (type_string, ",.", -1); num_types = g_strv_length (str_types); if (num_types > NNS_TENSOR_SIZE_LIMIT) { -- 2.7.4