Filter-like-Element: global pointers
nicolas at ndufresne.ca
Wed Mar 6 18:27:38 UTC 2019
Le mercredi 06 mars 2019 à 15:32 +0000, Serbiniyaz Anyyeva |
viewpointsystem a écrit :
> I am working on filter-like Element. I use global pointers, memory is allocated when first caps come.
> I need to free pointers after last last buffer, but I don't know how to do it. I tried to implement "_change_state" function but it seems this
> function is never called, i couldn't track it. Then i tried to free in "finalize" function, but then I get "invalid pointer" error message.
> Where should i free global pointers? I have own implementation of freeing memory for I use Cuda.
> I appreciate your help very much!
In general you should try and avoid global pointers inside GStreamer
plugins. If you think you can clean this pointer in finalize() or
state_change function, it's a sign that this pointer should not be
stored in global space. Overall though, you could need to give more
context if you want us to be able to provide better alternatives.
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 195 bytes
Desc: This is a digitally signed message part
More information about the gstreamer-devel