Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dav1d
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
François Cartegnie
dav1d
Commits
43b10aff
Commit
43b10aff
authored
Oct 17, 2018
by
Janne Grunau
Committed by
Ronald S. Bultje
Oct 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dav1d/ivf: return an error when fread fails
Fixes #66. Also fixes a leak of the demuxer context.
parent
7d7b8d42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
tools/dav1d.c
tools/dav1d.c
+3
-1
tools/input/ivf.c
tools/input/ivf.c
+4
-1
No files found.
tools/dav1d.c
View file @
43b10aff
...
...
@@ -88,8 +88,10 @@ int main(const int argc, char *const *const argv) {
return
res
;
}
for
(
unsigned
i
=
0
;
i
<=
cli_settings
.
skip
;
i
++
)
{
if
((
res
=
input_read
(
in
,
&
data
))
<
0
)
if
((
res
=
input_read
(
in
,
&
data
))
<
0
)
{
input_close
(
in
);
return
res
;
}
if
(
i
<
cli_settings
.
skip
)
dav1d_data_unref
(
&
data
);
}
...
...
tools/input/ivf.c
View file @
43b10aff
...
...
@@ -93,8 +93,11 @@ static int ivf_read(IvfInputContext *const c, Dav1dData *const buf) {
fseek
(
c
->
f
,
8
,
SEEK_CUR
);
// skip timestamp
const
ptrdiff_t
sz
=
rl32
(
data
);
dav1d_data_create
(
buf
,
sz
);
if
((
res
=
fread
(
buf
->
data
,
sz
,
1
,
c
->
f
))
!=
1
)
if
((
res
=
fread
(
buf
->
data
,
sz
,
1
,
c
->
f
))
!=
1
)
{
fprintf
(
stderr
,
"Failed to read frame data: %s
\n
"
,
strerror
(
errno
));
dav1d_data_unref
(
buf
);
return
-
1
;
}
return
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