Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
34aef4ad
Commit
34aef4ad
authored
Oct 10, 2008
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmap: Correct [
cbc1122a
]
I accidently change the probe, not the actual mmap() usage.
parent
8dcf947d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
modules/access/mmap.c
modules/access/mmap.c
+6
-8
No files found.
modules/access/mmap.c
View file @
34aef4ad
...
...
@@ -136,12 +136,7 @@ static int Open (vlc_object_t *p_this)
/* Autodetect mmap() support */
if
(
st
.
st_size
>
0
)
{
int
flags
=
MAP_PRIVATE
;
#if defined(MAP_NOCACHE)
flags
|=
MAP_NOCACHE
;
#endif
void
*
addr
=
mmap
(
NULL
,
1
,
PROT_READ
|
PROT_WRITE
,
flags
,
fd
,
0
);
void
*
addr
=
mmap
(
NULL
,
1
,
PROT_READ
|
PROT_WRITE
,
MAP_PRIVATE
,
fd
,
0
);
if
(
addr
!=
MAP_FAILED
)
munmap
(
addr
,
1
);
else
...
...
@@ -225,8 +220,11 @@ static block_t *Block (access_t *p_access)
/* NOTE: We use PROT_WRITE and MAP_PRIVATE so that the block can be
* modified down the chain, without messing up with the underlying
* original file. This does NOT need open write permission. */
void
*
addr
=
mmap
(
NULL
,
length
,
PROT_READ
|
PROT_WRITE
,
MAP_PRIVATE
,
p_sys
->
fd
,
outer_offset
);
void
*
addr
=
mmap
(
NULL
,
length
,
PROT_READ
|
PROT_WRITE
,
MAP_PRIVATE
#ifdef MAP_NO_CACHE
|
MAP_NOCACHE
#endif
,
p_sys
->
fd
,
outer_offset
);
if
(
addr
==
MAP_FAILED
)
{
msg_Err
(
p_access
,
"memory mapping failed (%m)"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment