[Filter/Custom] Ensure the loaded private data is stored at the desired position.
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 13 Sep 2018 09:34:42 +0000 (18:34 +0900)
committerMyungJoo Ham <myungjoo.ham@gmail.com>
Fri, 14 Sep 2018 12:44:21 +0000 (21:44 +0900)
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 <myungjoo.ham@samsung.com>
gst/tensor_filter/tensor_filter_custom.c

index a4c9c71..7167f5c 100644 (file)
@@ -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. */