mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 16:52:31 +00:00
fall back mmap() call using MAP_PRIVATE for working on no-mmu systems
patch by Mike Frysinger vapier.adi _at_ gmail.com Originally committed as revision 7380 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
62ade082bb
commit
d037d797a4
@ -218,10 +218,13 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
s->video_buf = mmap(0,s->gb_buffers.size,PROT_READ|PROT_WRITE,MAP_SHARED,video_fd,0);
|
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) {
|
||||||
|
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) {
|
if ((unsigned char*)-1 == s->video_buf) {
|
||||||
perror("mmap");
|
perror("mmap");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
s->gb_frame = 0;
|
s->gb_frame = 0;
|
||||||
s->time_frame = av_gettime() * s->frame_rate / s->frame_rate_base;
|
s->time_frame = av_gettime() * s->frame_rate / s->frame_rate_base;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user