From: Dongju Chae Date: Thu, 30 Jan 2020 04:55:55 +0000 (+0900) Subject: [Fix] add type checking for gst value in tensor_converter.c X-Git-Tag: v1.3.0~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5b6cf59d41fd504614d37feac9a3cb5402dfeb4;p=platform%2Fupstream%2Fnnstreamer.git [Fix] add type checking for gst value in tensor_converter.c This commit adds type checking for the gst value, supported_formats. When an unsupported colorspace is used, gst_value_list_get_size() has generated unnecessary warnings. Signed-off-by: Dongju Chae --- diff --git a/gst/nnstreamer/tensor_converter/tensor_converter.c b/gst/nnstreamer/tensor_converter/tensor_converter.c index 8c2f821..b206ee5 100644 --- a/gst/nnstreamer/tensor_converter/tensor_converter.c +++ b/gst/nnstreamer/tensor_converter/tensor_converter.c @@ -1244,7 +1244,8 @@ gst_tensor_converter_get_possible_media_caps (GstTensorConverter * self) break; } - if (gst_value_list_get_size (&supported_formats) > 0) { + if (G_VALUE_TYPE (&supported_formats) == GST_TYPE_LIST && + gst_value_list_get_size (&supported_formats) > 0) { gst_structure_set_value (st, "format", &supported_formats); } g_value_unset (&supported_formats);