From b950581d178457c238f876105b6476648939545d Mon Sep 17 00:00:00 2001 From: Wook Song Date: Wed, 13 Mar 2019 15:59:47 +0900 Subject: [PATCH] [Transform] Handle error due to wrong option string gracefully This patch replaces assertion code for handling wrong option string with the code returning error code in order to gracefully terminate the pipeline with proper error messages. Signed-off-by: Wook Song --- gst/nnstreamer/tensor_transform/tensor_transform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/nnstreamer/tensor_transform/tensor_transform.c b/gst/nnstreamer/tensor_transform/tensor_transform.c index d409749..a0164ef 100644 --- a/gst/nnstreamer/tensor_transform/tensor_transform.c +++ b/gst/nnstreamer/tensor_transform/tensor_transform.c @@ -1385,7 +1385,8 @@ gst_tensor_transform_transform (GstBaseTransform * trans, uint8_t *inptr, *outptr; GstMapInfo inInfo, outInfo; - g_assert (filter->loaded); + g_return_val_if_fail (filter->loaded, GST_FLOW_ERROR); + g_assert (gst_buffer_map (inbuf, &inInfo, GST_MAP_READ)); g_assert (gst_buffer_map (outbuf, &outInfo, GST_MAP_WRITE)); -- 2.7.4