[vlc-devel] commit: Fix a potential corruption in release_input_thread(). (Sam Hocevar )
Pierre d'Herbemont
pdherbemont at free.fr
Sat Mar 22 22:45:20 CET 2008
On Mar 21, 2008, at 11:26 PM, git version control wrote:
> vlc | branch: master | Sam Hocevar <sam at zoy.org> | Fri Mar 21
> 22:50:25 2008 +0100| [37558f4a013787f3a197db1de20aa6f0427ab2b1]
>
> Fix a potential corruption in release_input_thread().
>
> If the media instance owns the input and
> libvlc_media_instance_release()
> is called immediately after libvlc_media_instance_stop(), there is a
> chance that we try to free the input resources before the thread is
> effectively terminated. To avoid this, we call input_DestroyThread()
> instead of vlc_object_release() at the end of release_input_thread()
> when
> the media instance owns the input thread.
I was thinking about moving input_DestroyThread's vlc_thread_join into
the input's Destructor. Cause in the other case ("else") if the
vlc_object's refcount reaches 0, we also have this potential corruption.
Pierre.
More information about the vlc-devel
mailing list