Re: [PATCH spice-gtk] Add call of gst_deinit at program exit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On 19 Oct 2017, at 15:10, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote:
> 
> On Thu, Oct 19, 2017 at 03:01:17PM +0200, Christophe de Dinechin wrote:
>>> One reason is that you may use a library dynamically, and you may dlclose() it, and then atexit() will likely crash. 
>> 
>> Is that a real or theoretical scenario? Who loads this library dynamically
>> currently?
> 
> Anyone using SPICE from a non-C language will have dlopen'd it and potentially
> later dlclose it. 

I’m actually quite curious how this could possibly fly today, given what I learned
recently about how we deal with gstreamer objects. Closing the library
seems a bit difficult. There isn’t even a header for that library.

That being said, there is this in spicy.c:

#if HAVE_GSTAUDIO || HAVE_GSTVIDEO
    gst_init(&argc, &argv);
#endif

So I guess it makes sense to put the gst_deinit there. Ugly #ifdefs included.
I’ll do a patch with this approach instead.

In that case, do we really need calls to gst_init_check() in the “library"?

> 
> Regards,
> Daniel
> -- 
> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]