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
270d4c8d
Commit
270d4c8d
authored
Sep 16, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmap: handle I/O errors as fatal
parent
f77a6c48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
modules/access/mmap.c
modules/access/mmap.c
+6
-3
No files found.
modules/access/mmap.c
View file @
270d4c8d
...
@@ -213,8 +213,7 @@ static block_t *Block (access_t *p_access)
...
@@ -213,8 +213,7 @@ static block_t *Block (access_t *p_access)
msg_Err
(
p_access
,
"memory mapping failed (%m)"
);
msg_Err
(
p_access
,
"memory mapping failed (%m)"
);
intf_UserFatal
(
p_access
,
false
,
_
(
"File reading failed"
),
intf_UserFatal
(
p_access
,
false
,
_
(
"File reading failed"
),
_
(
"VLC could not read the file."
));
_
(
"VLC could not read the file."
));
msleep
(
INPUT_ERROR_SLEEP
);
goto
fatal
;
return
NULL
;
}
}
#ifdef HAVE_POSIX_MADVISE
#ifdef HAVE_POSIX_MADVISE
posix_madvise
(
addr
,
length
,
POSIX_MADV_SEQUENTIAL
);
posix_madvise
(
addr
,
length
,
POSIX_MADV_SEQUENTIAL
);
...
@@ -222,7 +221,7 @@ static block_t *Block (access_t *p_access)
...
@@ -222,7 +221,7 @@ static block_t *Block (access_t *p_access)
block_t
*
block
=
block_mmap_Alloc
(
addr
,
length
);
block_t
*
block
=
block_mmap_Alloc
(
addr
,
length
);
if
(
block
==
NULL
)
if
(
block
==
NULL
)
return
NULL
;
goto
fatal
;
block
->
p_buffer
+=
inner_offset
;
block
->
p_buffer
+=
inner_offset
;
block
->
i_buffer
-=
inner_offset
;
block
->
i_buffer
-=
inner_offset
;
...
@@ -245,6 +244,10 @@ static block_t *Block (access_t *p_access)
...
@@ -245,6 +244,10 @@ static block_t *Block (access_t *p_access)
p_access
->
info
.
i_pos
=
outer_offset
+
length
;
p_access
->
info
.
i_pos
=
outer_offset
+
length
;
return
block
;
return
block
;
fatal:
p_access
->
info
.
b_eof
=
true
;
return
NULL
;
}
}
...
...
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