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
4ed5ac50
Commit
4ed5ac50
authored
Sep 14, 2012
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
file: return proper error on seek failures
parent
2568646a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
file.c
libavformat/file.c
+8
-2
No files found.
libavformat/file.c
View file @
4ed5ac50
...
@@ -121,12 +121,18 @@ static int file_open(URLContext *h, const char *filename, int flags)
...
@@ -121,12 +121,18 @@ static int file_open(URLContext *h, const char *filename, int flags)
static
int64_t
file_seek
(
URLContext
*
h
,
int64_t
pos
,
int
whence
)
static
int64_t
file_seek
(
URLContext
*
h
,
int64_t
pos
,
int
whence
)
{
{
FileContext
*
c
=
h
->
priv_data
;
FileContext
*
c
=
h
->
priv_data
;
int
ret
;
if
(
whence
==
AVSEEK_SIZE
)
{
if
(
whence
==
AVSEEK_SIZE
)
{
struct
stat
st
;
struct
stat
st
;
int
ret
=
fstat
(
c
->
fd
,
&
st
);
ret
=
fstat
(
c
->
fd
,
&
st
);
return
ret
<
0
?
AVERROR
(
errno
)
:
st
.
st_size
;
return
ret
<
0
?
AVERROR
(
errno
)
:
st
.
st_size
;
}
}
return
lseek
(
c
->
fd
,
pos
,
whence
);
ret
=
lseek
(
c
->
fd
,
pos
,
whence
);
return
ret
<
0
?
AVERROR
(
errno
)
:
ret
;
}
}
static
int
file_close
(
URLContext
*
h
)
static
int
file_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