[FFmpeg-cvslog] r31984 - trunk/libswscale/utils.c
ramiro
subversion
Fri Aug 20 01:48:19 CEST 2010
Author: ramiro
Date: Fri Aug 20 01:48:19 2010
New Revision: 31984
Log:
fix anonymous memory mapping for NetBSD
mmap() with MAP_ANONYMOUS requires the file descriptor to be -1 in NetBSD.
Linux just ignores this parameter.
Patch by Grant Carver <grantc at cat dot co dot za>
Modified:
trunk/libswscale/utils.c
Modified: trunk/libswscale/utils.c
==============================================================================
--- trunk/libswscale/utils.c Fri Aug 20 00:13:25 2010 (r31983)
+++ trunk/libswscale/utils.c Fri Aug 20 01:48:19 2010 (r31984)
@@ -897,8 +897,8 @@ SwsContext *sws_getContext(int srcW, int
c->chrMmx2FilterCodeSize = initMMX2HScaler(c->chrDstW, c->chrXInc, NULL, NULL, NULL, 4);
#ifdef MAP_ANONYMOUS
- c->lumMmx2FilterCode = mmap(NULL, c->lumMmx2FilterCodeSize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
- c->chrMmx2FilterCode = mmap(NULL, c->chrMmx2FilterCodeSize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
+ c->lumMmx2FilterCode = mmap(NULL, c->lumMmx2FilterCodeSize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ c->chrMmx2FilterCode = mmap(NULL, c->chrMmx2FilterCodeSize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
#elif HAVE_VIRTUALALLOC
c->lumMmx2FilterCode = VirtualAlloc(NULL, c->lumMmx2FilterCodeSize, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
c->chrMmx2FilterCode = VirtualAlloc(NULL, c->chrMmx2FilterCodeSize, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
More information about the ffmpeg-cvslog
mailing list