[vlc-devel] Re: Multiple instances of vlc have incorrect instance references (vlc on windows unstable?)
filippo at carone.org
Sun May 13 20:53:40 CEST 2007
Tony Anecito ha scritto:
> Hi Ahmad,
> I figured out how to keep vlc from crashing the Sun jvm. in the
> removeNotify() in the Cavas with the peer call the
> super.removeNotify() then the destroy. That seems the only way to
> keep things from crashing. Never call destroy while the peer it is
> associated with is still tied to the Canvas.
> Now at least the vout_RequestWindow has the correct windows handle
> but not the expected libvlc instance for the window.
> The jvlc and vlc team can decide what they want to do but at least I
> have a way to keep the jre/jvlc/vlc combination working when peers
> are destroyed when toFront() or moveToFront() is called.
> Regards, -Tony
as you figured out, the problem of the jvm crash was about the existance
of the peer when calling destroy(). The destroy method deallocates the
libvlc instance and all its objects, including vout. So the correct way
of calling destroy is, as you said, after the peer has been deallocated.
I think that cleaning up the peer before calling destroy is up to the
I'm going to override removenotify in order to tighen the cases of jvm
crashes, but still calling jvlc.destroy() when the peer is still
attached to the vout will cause a crash.
If there are other changes you did to vlc or to the java bindings,
please make them public so that i can include them in the jvlc distribution.
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel