From: MyungJoo Ham Date: Thu, 13 Sep 2018 09:34:42 +0000 (+0900) Subject: [Filter/Custom] Ensure the loaded private data is stored at the desired position. X-Git-Tag: v0.0.2~99 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93d2427b5816e0b64e6404e9815a439898ee813f;p=platform%2Fupstream%2Fnnstreamer.git [Filter/Custom] Ensure the loaded private data is stored at the desired position. We check filter->privateData to see if the custom filter (.so) is already loaded or not. Thus, in order to prevent duplicated filter loading, we need to ensure that the created private data (*private_data) is stored at the desired location (filter->privateData). Signed-off-by: MyungJoo Ham --- diff --git a/gst/tensor_filter/tensor_filter_custom.c b/gst/tensor_filter/tensor_filter_custom.c index a4c9c71..7167f5c 100644 --- a/gst/tensor_filter/tensor_filter_custom.c +++ b/gst/tensor_filter/tensor_filter_custom.c @@ -63,6 +63,7 @@ custom_loadlib (const GstTensor_Filter * filter, void **private_data) ptr = g_new0 (internal_data, 1); /* Fill Zero! */ *private_data = ptr; + g_assert (*private_data == filter->privateData); ptr->parent = GstTensor_Filter_of_privateData (private_data); /* Load .so if this is the first time for this instance. */