diff options
author | wm4 <wm4@nowhere> | 2014-12-26 17:14:48 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-26 17:30:10 +0100 |
commit | 3fdb6be3166790ff3aad68dd4d4bb83963815e4b (patch) | |
tree | d114681f0209288e69120c4d253304214c2699dd /player | |
parent | 9317071bc309dfe22cf3b295de20e18ae9b80c26 (diff) | |
download | mpv-3fdb6be3166790ff3aad68dd4d4bb83963815e4b.tar.bz2 mpv-3fdb6be3166790ff3aad68dd4d4bb83963815e4b.tar.xz |
win32: add mmap() emulation
Makes all of overlay_add work on windows/mingw.
Since we now don't explicitly check for mmap() anymore (it's always
present), this also requires us to make af_export.c compile, but I
haven't tested it.
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/player/command.c b/player/command.c index b4e691c053..c690b6395e 100644 --- a/player/command.c +++ b/player/command.c @@ -60,9 +60,6 @@ #include "audio/decode/dec_audio.h" #include "options/path.h" #include "screenshot.h" -#if HAVE_SYS_MMAN_H -#include <sys/mman.h> -#endif #ifndef __MINGW32__ #include <sys/wait.h> #endif @@ -3825,13 +3822,9 @@ static void replace_overlay(struct MPContext *mpctx, int id, struct overlay *new *ptr = *new; recreate_overlays(mpctx); -#if HAVE_SYS_MMAN_H // Do this afterwards, so we never unmap while the OSD is using it. if (old.osd.bitmap && old.map_size) munmap(old.osd.bitmap, old.map_size); -#else - (void)old; -#endif } static int overlay_add(struct MPContext *mpctx, int id, int x, int y, @@ -3878,10 +3871,8 @@ static int overlay_add(struct MPContext *mpctx, int id, int x, int y, fd = open(file, O_RDONLY | O_BINARY | O_CLOEXEC); } if (fd >= 0) { -#if HAVE_SYS_MMAN_H overlay.map_size = h * stride; p = mmap(NULL, overlay.map_size, PROT_READ, MAP_SHARED, fd, offset); -#endif if (close_fd) close(fd); } |