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
4b6976c1
Commit
4b6976c1
authored
Mar 08, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed stream_t (stream mode) read.
It fixes a growing amount of cache as noticed by Sbastien Escudier.
parent
7fd00f2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
src/input/stream.c
src/input/stream.c
+10
-6
No files found.
src/input/stream.c
View file @
4b6976c1
...
@@ -1101,11 +1101,15 @@ static int AStreamReadStream( stream_t *s, void *p_read, unsigned int i_read )
...
@@ -1101,11 +1101,15 @@ static int AStreamReadStream( stream_t *s, void *p_read, unsigned int i_read )
/* */
/* */
p_sys
->
stream
.
i_used
+=
i_copy
;
p_sys
->
stream
.
i_used
+=
i_copy
;
if
(
tk
->
i_start
+
p_sys
->
stream
.
i_offset
>=
tk
->
i_end
||
p_sys
->
stream
.
i_used
>=
p_sys
->
stream
.
i_read_size
)
if
(
tk
->
i_end
-
tk
->
i_start
-
p_sys
->
stream
.
i_offset
<
i_read
-
i_data
)
{
{
if
(
p_sys
->
stream
.
i_used
<
i_read
-
i_data
)
const
int
i_read_requested
=
__MAX
(
__MIN
(
i_read
-
i_data
,
p_sys
->
stream
.
i_used
=
__MIN
(
i_read
-
i_data
,
STREAM_READ_ATONCE
*
10
);
STREAM_READ_ATONCE
*
10
),
STREAM_READ_ATONCE
/
2
);
if
(
p_sys
->
stream
.
i_used
<
i_read_requested
)
p_sys
->
stream
.
i_used
=
i_read_requested
;
if
(
AStreamRefillStream
(
s
)
)
if
(
AStreamRefillStream
(
s
)
)
{
{
...
@@ -1258,8 +1262,8 @@ static int AStreamSeekStream( stream_t *s, int64_t i_pos )
...
@@ -1258,8 +1262,8 @@ static int AStreamSeekStream( stream_t *s, int64_t i_pos )
p_sys
->
stream
.
i_tk
=
i
;
p_sys
->
stream
.
i_tk
=
i
;
p_sys
->
stream
.
i_offset
=
i_pos
-
tk
->
i_start
;
p_sys
->
stream
.
i_offset
=
i_pos
-
tk
->
i_start
;
if
(
p_sys
->
stream
.
i_used
<
1024
)
if
(
p_sys
->
stream
.
i_used
<
STREAM_READ_ATONCE
)
p_sys
->
stream
.
i_used
=
1024
;
p_sys
->
stream
.
i_used
=
STREAM_READ_ATONCE
;
if
(
AStreamRefillStream
(
s
)
&&
i_pos
==
tk
->
i_end
)
if
(
AStreamRefillStream
(
s
)
&&
i_pos
==
tk
->
i_end
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
...
...
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