[vlc-devel] libvlc_media_instance_release causing segfaults

Enrique Osuna enrique.osuna at gmail.com
Wed Oct 3 02:03:56 CEST 2007

libvlc_media_instance_release (src/control/media_instance.c) was
causing segment faults.  I was able to trace it back to the
input_position_changed (src/control/media_instance.c) callback.  It
was trying to send an event to the event manager after the event
manager was freed.

I reviewed libvlc_media_instance_release and saw that the event
manager was one of the first sub objects to be released...the
input_thread was still alive and was trying to feed into the event
manager well after the event manager was destroyed.  I moved
release_input_thread before libvlc_event_manager_release (please see

Side note, I did pause the video (via libvlc_media_instance_pause)
before I called libvlc_media_instance_release, but the input_thread
kept updating the "intf-change" variable causing
input_position_changed to be executed.

- Enrique
-------------- next part --------------
A non-text attachment was scrubbed...
Name: media-instance-release-segfault.patch
Type: application/octet-stream
Size: 527 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20071003/c61090ef/attachment.obj>

More information about the vlc-devel mailing list