# HG changeset patch # User aurel # Date 1167265926 0 # Node ID ec546897df3d3536aaf07d4bc2c300080b9811d2 # Parent 26a7d15e4c9d746801152aa672bac12d5a28994f fall back mmap() call using MAP_PRIVATE for working on no-mmu systems patch by Mike Frysinger vapier.adi _at_ gmail.com diff -r 26a7d15e4c9d -r ec546897df3d grab.c --- a/grab.c Thu Dec 28 00:24:24 2006 +0000 +++ b/grab.c Thu Dec 28 00:32:06 2006 +0000 @@ -219,8 +219,11 @@ } else { s->video_buf = mmap(0,s->gb_buffers.size,PROT_READ|PROT_WRITE,MAP_SHARED,video_fd,0); if ((unsigned char*)-1 == s->video_buf) { - perror("mmap"); - goto fail; + s->video_buf = mmap(0,s->gb_buffers.size,PROT_READ|PROT_WRITE,MAP_PRIVATE,video_fd,0); + if ((unsigned char*)-1 == s->video_buf) { + perror("mmap"); + goto fail; + } } s->gb_frame = 0; s->time_frame = av_gettime() * s->frame_rate / s->frame_rate_base;