Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
ce3c305f
Commit
ce3c305f
authored
Feb 21, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug the debug
parent
d801998f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
modules/access/mmap.c
modules/access/mmap.c
+11
-6
No files found.
modules/access/mmap.c
View file @
ce3c305f
...
@@ -155,12 +155,6 @@ static void Close (vlc_object_t * p_this)
...
@@ -155,12 +155,6 @@ static void Close (vlc_object_t * p_this)
static
block_t
*
Block
(
access_t
*
p_access
)
static
block_t
*
Block
(
access_t
*
p_access
)
{
{
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
#ifndef NDEBUG
int64_t
dbgpos
=
lseek
(
p_sys
->
fd
,
0
,
SEEK_CUR
);
if
(
dbgpos
!=
p_access
->
info
.
i_pos
)
msg_Err
(
p_access
,
"position: 0x%08llx instead of 0x%08llx"
,
p_access
->
info
.
i_pos
,
dbgpos
);
#endif
if
((
uint64_t
)
p_access
->
info
.
i_pos
>=
(
uint64_t
)
p_access
->
info
.
i_size
)
if
((
uint64_t
)
p_access
->
info
.
i_pos
>=
(
uint64_t
)
p_access
->
info
.
i_size
)
{
{
...
@@ -183,6 +177,13 @@ static block_t *Block (access_t *p_access)
...
@@ -183,6 +177,13 @@ static block_t *Block (access_t *p_access)
}
}
}
}
#ifndef NDEBUG
int64_t
dbgpos
=
lseek
(
p_sys
->
fd
,
0
,
SEEK_CUR
);
if
(
dbgpos
!=
p_access
->
info
.
i_pos
)
msg_Err
(
p_access
,
"position: 0x%08llx instead of 0x%08llx"
,
p_access
->
info
.
i_pos
,
dbgpos
);
#endif
const
uintptr_t
page_mask
=
p_sys
->
page_size
-
1
;
const
uintptr_t
page_mask
=
p_sys
->
page_size
-
1
;
/* Start the mapping on a page boundary: */
/* Start the mapping on a page boundary: */
off_t
outer_offset
=
p_access
->
info
.
i_pos
&
~
page_mask
;
off_t
outer_offset
=
p_access
->
info
.
i_pos
&
~
page_mask
;
...
@@ -243,6 +244,10 @@ static block_t *Block (access_t *p_access)
...
@@ -243,6 +244,10 @@ static block_t *Block (access_t *p_access)
static
int
Seek
(
access_t
*
p_access
,
int64_t
i_pos
)
static
int
Seek
(
access_t
*
p_access
,
int64_t
i_pos
)
{
{
#ifndef NDEBUG
lseek
(
p_access
->
p_sys
->
fd
,
i_pos
,
SEEK_SET
);
#endif
p_access
->
info
.
i_pos
=
i_pos
;
p_access
->
info
.
i_pos
=
i_pos
;
p_access
->
info
.
b_eof
=
VLC_FALSE
;
p_access
->
info
.
b_eof
=
VLC_FALSE
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
...
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