[MPlayer-dev-eng] [PATCH] vo_macosx: use mmap instead of shmat for MPlayerOSX
Adrian Stutz
adrian at sttz.ch
Tue Oct 14 20:17:21 CEST 2008
On Mon, Oct 13, 2008 at 21:07:13 +0800, Ulion <ulion2002 at gmail.com> wrote:
> it looks not bad, I have two questions:
>
> 1. although the same problem may also exists in current code, should
> the shm_id be unlinked when any error occurs after shm_open?
> 2. will this work on 10.3.*?
>
1. yes, that's right. else it won't be able to re-initialize the shared
memory after a failure, changed patches attached.
i also changed perror to mp_msg since that seems to be preferred and removed
shm_unlink from the mplayerosx code because it only has to be called from
mplayer (it would get unlinked from mplayerosx in the previous patch and
make mplayer fail on its later try).
2. shm_open/mmap have been around since 10.0, so it should theoretically
work on 10.3.
i also just confirmed that the patch works on 10.4. I don't have a 10.3 at
hand to test it there, though.
greetings
Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vo_macosx_shm.patch
Type: application/octet-stream
Size: 2543 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081014/6b536e01/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayerosx_shm.patch
Type: application/octet-stream
Size: 1798 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081014/6b536e01/attachment-0001.obj>
More information about the MPlayer-dev-eng
mailing list