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
e1588d2c
Commit
e1588d2c
authored
Feb 08, 2016
by
Steve Lhomme
Committed by
Rémi Denis-Courmont
Feb 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prefetch: don't do anything when reading 0 bytes
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
ccd6ba5d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
modules/stream_filter/prefetch.c
modules/stream_filter/prefetch.c
+5
-6
No files found.
modules/stream_filter/prefetch.c
View file @
e1588d2c
...
@@ -307,6 +307,8 @@ static ssize_t Read(stream_t *stream, void *buf, size_t buflen)
...
@@ -307,6 +307,8 @@ static ssize_t Read(stream_t *stream, void *buf, size_t buflen)
size_t
copy
;
size_t
copy
;
bool
eof
;
bool
eof
;
if
(
buflen
==
0
)
return
buflen
;
if
(
buf
==
NULL
)
if
(
buf
==
NULL
)
{
{
Seek
(
stream
,
sys
->
stream_offset
+
buflen
);
Seek
(
stream
,
sys
->
stream_offset
+
buflen
);
...
@@ -339,12 +341,9 @@ static ssize_t Read(stream_t *stream, void *buf, size_t buflen)
...
@@ -339,12 +341,9 @@ static ssize_t Read(stream_t *stream, void *buf, size_t buflen)
char
*
p
=
sys
->
buffer
+
(
sys
->
stream_offset
%
sys
->
buffer_size
);
char
*
p
=
sys
->
buffer
+
(
sys
->
stream_offset
%
sys
->
buffer_size
);
if
(
copy
>
buflen
)
if
(
copy
>
buflen
)
copy
=
buflen
;
copy
=
buflen
;
if
(
copy
>
0
)
{
memcpy
(
buf
,
p
,
copy
);
memcpy
(
buf
,
p
,
copy
);
sys
->
stream_offset
+=
copy
;
sys
->
stream_offset
+=
copy
;
vlc_cond_signal
(
&
sys
->
wait_space
);
vlc_cond_signal
(
&
sys
->
wait_space
);
}
vlc_mutex_unlock
(
&
sys
->
lock
);
vlc_mutex_unlock
(
&
sys
->
lock
);
return
copy
;
return
copy
;
}
}
...
...
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