From: Yongjoo Ahn Date: Thu, 9 Feb 2023 12:38:32 +0000 (+0900) Subject: [test] Fix unittest_sink with recent change in GstTensorsInfo X-Git-Tag: accepted/tizen/unified/20230424.185348~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5611112d979637c9ee19f3999f16a677036552b1;p=platform%2Fupstream%2Fnnstreamer.git [test] Fix unittest_sink with recent change in GstTensorsInfo - Add init and free of tensors_info in the callback Signed-off-by: Yongjoo Ahn --- diff --git a/tests/nnstreamer_sink/unittest_sink.cc b/tests/nnstreamer_sink/unittest_sink.cc index 395c817..c23d794 100644 --- a/tests/nnstreamer_sink/unittest_sink.cc +++ b/tests/nnstreamer_sink/unittest_sink.cc @@ -6431,6 +6431,8 @@ _manual_extra_tensors_new_data_cb (GstElement *element, GstBuffer *buffer, gpoin gint *output, i; gboolean ret; GstTensorsInfo ts_info; + + gst_tensors_info_init (&ts_info); ts_info.num_tensors = 20; data_received++; @@ -6443,10 +6445,12 @@ _manual_extra_tensors_new_data_cb (GstElement *element, GstBuffer *buffer, gpoin gst_memory_unmap (mem_res, &info_res); gst_memory_unref (mem_res); } + + gst_tensors_info_free (&ts_info); } /** - * @brief TBU + * @brief Test for extra tensors which are created with gst_tensors_extra_append_memory_to_buffer API. */ TEST (extraTensors, manualextratensors) {