]> git.sesse.net Git - vlc/commit - modules/gui/minimal_macosx/VLCOpenGLVoutView.h
macosx/framework: Make sure the nsobject drawable is never used after being freed.
authorPierre d'Herbemont <pdherbemont@free.fr>
Mon, 7 Dec 2009 17:49:02 +0000 (18:49 +0100)
committerPierre d'Herbemont <pdherbemont@free.fr>
Mon, 7 Dec 2009 20:49:32 +0000 (21:49 +0100)
commit2a45504451ead32bea132c360c6b0ba5470fd976
tree2479de2b8953c08d758d8b0224d87c639ac10c5c
parentbbce7c4cae681298d6f49c7e605ed3775cbc0e1d
macosx/framework: Make sure the nsobject drawable is never used after being freed.

This issue was pointed out by Sébastien Zwickert.

We ensure this by two things:
- Retaining it by the media player and ensuring we are effectively stopped when releasing it. (ie, no one will use the drawable from now on).
- Retaining it during the life span of the vout. After a stop, the drawable might still be in the progress of receiving the notification of the vout removal, so we need it not to be freed during this period of time.
An alternative would be to create a protocol between drawable->vout to unregister the drawable.
modules/gui/minimal_macosx/VLCOpenGLVoutView.h
modules/gui/minimal_macosx/VLCOpenGLVoutView.m
projects/macosx/framework/Headers/Public/VLCMediaPlayer.h
projects/macosx/framework/Sources/VLCMediaPlayer.m