Re: [spice-gtk v1 4/6] session: gst_deinit() GStreamer if we initialize it

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

 



Hi,

On Mon, Sep 09, 2019 at 05:53:32AM -0400, Frediano Ziglio wrote:
> > > If A initialize Gstreamer and B don't but just check is
> > > initialized then when A call deinit the objects used by B
> > > will contain potential dangling pointers. One right
> > > interface would be simply init/deinit and use a counter to
> > > track the number of initialization.
> > 
> > All channels are related to SpiceSession, that's why I moved
> > it there. Seems reasonable to me at least.
> > 
> 
> Yes, it is. But this won't fix Gstreamer API.
> Nobody forbid users to use spice-gtk library in another program
> to provide for instance multiple VM access using multiple GUI tabs.

Ah, i get what you mean. Indeed, this patch would make a
necessity that Boxes or Virt-manager to call gst_init()
themselves in order to avoid breaking a ongoing Spice session
because the owner of the caller of gst_init() is calling
gst_deinit().

I'll drop this patch and the RFC with unit test as well because
without gst_deinit() there isn't much point on unit testing this
:)

Thanks!

> If the other part will use Gstreamer calling gst_deinit without making
> sure nobody else will use it will potentially lead to memory issues.
> That's my suggestion "don't do it". Calling that from spicy is fine,
> because you know nobody else is using Gstreamer, not in a library.
> 
> > I'll fix proposed changes and send a v2, many thanks for review!
> > 
> >  - toso
> > 
> 
> Frediano

Attachment: signature.asc
Description: PGP signature

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

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