[Ffmpeg-cvslog] r7380 - trunk/libavformat/grab.c

aurel subversion
Thu Dec 28 01:32:06 CET 2006


Author: aurel
Date: Thu Dec 28 01:32:06 2006
New Revision: 7380

Modified:
   trunk/libavformat/grab.c

Log:
fall back mmap() call using MAP_PRIVATE for working on no-mmu systems
patch by Mike Frysinger   vapier.adi _at_ gmail.com


Modified: trunk/libavformat/grab.c
==============================================================================
--- trunk/libavformat/grab.c	(original)
+++ trunk/libavformat/grab.c	Thu Dec 28 01:32:06 2006
@@ -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;




More information about the ffmpeg-cvslog mailing list