From 5611112d979637c9ee19f3999f16a677036552b1 Mon Sep 17 00:00:00 2001 From: Yongjoo Ahn Date: Thu, 9 Feb 2023 21:38:32 +0900 Subject: [PATCH] [test] Fix unittest_sink with recent change in GstTensorsInfo - Add init and free of tensors_info in the callback Signed-off-by: Yongjoo Ahn --- tests/nnstreamer_sink/unittest_sink.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) { -- 2.7.4