Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
7018d3d3
Commit
7018d3d3
authored
Dec 25, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/cache: Use the correct io handle in seeking
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
dedd3c89
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
cache.c
libavformat/cache.c
+7
-5
No files found.
libavformat/cache.c
View file @
7018d3d3
...
...
@@ -195,6 +195,7 @@ static int cache_read(URLContext *h, unsigned char *buf, int size)
static
int64_t
cache_seek
(
URLContext
*
h
,
int64_t
pos
,
int
whence
)
{
Context
*
c
=
h
->
priv_data
;
int64_t
ret
;
if
(
whence
==
AVSEEK_SIZE
)
{
pos
=
ffurl_seek
(
c
->
inner
,
pos
,
whence
);
...
...
@@ -224,13 +225,14 @@ static int64_t cache_seek(URLContext *h, int64_t pos, int whence)
}
//cache miss
pos
=
lseek
(
c
->
fd
,
pos
,
whence
);
if
(
pos
>=
0
)
{
c
->
logical_pos
=
pos
;
c
->
end
=
FFMAX
(
c
->
end
,
pos
);
ret
=
ffurl_seek
(
c
->
inner
,
pos
,
whence
);
if
(
ret
>=
0
)
{
c
->
logical_pos
=
ret
;
c
->
end
=
FFMAX
(
c
->
end
,
ret
);
}
return
pos
;
return
ret
;
}
static
int
cache_close
(
URLContext
*
h
)
...
...
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