Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
dfac14e6
Commit
dfac14e6
authored
Dec 10, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not use vmsplice in case of underflow (near end-of-file)
parent
2e3d76dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
modules/stream_filter/decomp.c
modules/stream_filter/decomp.c
+7
-2
No files found.
modules/stream_filter/decomp.c
View file @
dfac14e6
...
...
@@ -82,6 +82,9 @@ static void *Thread (void *data)
{
stream_t
*
stream
=
data
;
stream_sys_t
*
p_sys
=
stream
->
p_sys
;
#ifdef __linux__
uintptr_t
page_mask
=
sysconf
(
_SC_PAGE_SIZE
)
-
1
;
#endif
int
fd
=
p_sys
->
write_fd
;
bool
error
=
false
;
...
...
@@ -108,9 +111,11 @@ static void *Thread (void *data)
struct
iovec
iov
[
1
]
=
{
{
buf
+
i
,
len
-
i
,
}
};
#ifdef __linux__
j
=
vmsplice
(
fd
,
iov
,
1
,
SPLICE_F_GIFT
);
if
(((
len
|
i
)
&
page_mask
)
==
0
)
j
=
vmsplice
(
fd
,
iov
,
1
,
SPLICE_F_GIFT
);
else
#else
j
=
writev
(
fd
,
iov
,
1
);
j
=
writev
(
fd
,
iov
,
1
);
#endif
if
(
j
<=
0
)
{
...
...
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