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
043800a9
Commit
043800a9
authored
Jul 15, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_fps: add more error checks.
parent
d515e9c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
vf_fps.c
libavfilter/vf_fps.c
+17
-2
No files found.
libavfilter/vf_fps.c
View file @
043800a9
...
...
@@ -184,7 +184,10 @@ static int end_frame(AVFilterLink *inlink)
/* discard frames until we get the first timestamp */
if
(
s
->
pts
==
AV_NOPTS_VALUE
)
{
if
(
buf
->
pts
!=
AV_NOPTS_VALUE
)
{
write_to_fifo
(
s
->
fifo
,
buf
);
ret
=
write_to_fifo
(
s
->
fifo
,
buf
);
if
(
ret
<
0
)
return
ret
;
s
->
first_pts
=
s
->
pts
=
buf
->
pts
;
}
else
{
av_log
(
ctx
,
AV_LOG_WARNING
,
"Discarding initial frame(s) with no "
...
...
@@ -227,8 +230,20 @@ static int end_frame(AVFilterLink *inlink)
/* duplicate the frame if needed */
if
(
!
av_fifo_size
(
s
->
fifo
)
&&
i
<
delta
-
1
)
{
AVFilterBufferRef
*
dup
=
avfilter_ref_buffer
(
buf_out
,
AV_PERM_READ
);
av_log
(
ctx
,
AV_LOG_DEBUG
,
"Duplicating frame.
\n
"
);
write_to_fifo
(
s
->
fifo
,
avfilter_ref_buffer
(
buf_out
,
AV_PERM_READ
));
if
(
dup
)
ret
=
write_to_fifo
(
s
->
fifo
,
dup
);
else
ret
=
AVERROR
(
ENOMEM
);
if
(
ret
<
0
)
{
avfilter_unref_bufferp
(
&
buf_out
);
avfilter_unref_bufferp
(
&
buf
);
return
ret
;
}
s
->
dup
++
;
}
...
...
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