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
123f6dc6
Commit
123f6dc6
authored
Oct 06, 2017
by
Sasi Inguva
Committed by
Nicolas George
Oct 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/avfilter.c: Correct guess_status_pts to account for differing link timebases.
Signed-off-by:
Sasi Inguva
<
isasi@google.com
>
parent
a20f64be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
avfilter.c
libavfilter/avfilter.c
+4
-4
No files found.
libavfilter/avfilter.c
View file @
123f6dc6
...
...
@@ -427,19 +427,19 @@ int ff_request_frame(AVFilterLink *link)
return
0
;
}
static
int64_t
guess_status_pts
(
AVFilterContext
*
ctx
,
int
status
)
static
int64_t
guess_status_pts
(
AVFilterContext
*
ctx
,
int
status
,
AVRational
link_time_base
)
{
unsigned
i
;
int64_t
r
=
INT64_MAX
;
for
(
i
=
0
;
i
<
ctx
->
nb_inputs
;
i
++
)
if
(
ctx
->
inputs
[
i
]
->
status_out
==
status
)
r
=
FFMIN
(
r
,
ctx
->
inputs
[
i
]
->
current_pts
);
r
=
FFMIN
(
r
,
av_rescale_q
(
ctx
->
inputs
[
i
]
->
current_pts
,
ctx
->
inputs
[
i
]
->
time_base
,
link_time_base
)
);
if
(
r
<
INT64_MAX
)
return
r
;
av_log
(
ctx
,
AV_LOG_WARNING
,
"EOF timestamp not reliable
\n
"
);
for
(
i
=
0
;
i
<
ctx
->
nb_inputs
;
i
++
)
r
=
FFMIN
(
r
,
ctx
->
inputs
[
i
]
->
status_in_pts
);
r
=
FFMIN
(
r
,
av_rescale_q
(
ctx
->
inputs
[
i
]
->
status_in_pts
,
ctx
->
inputs
[
i
]
->
time_base
,
link_time_base
)
);
if
(
r
<
INT64_MAX
)
return
r
;
return
AV_NOPTS_VALUE
;
...
...
@@ -458,7 +458,7 @@ static int ff_request_frame_to_filter(AVFilterLink *link)
ret
=
ff_request_frame
(
link
->
src
->
inputs
[
0
]);
if
(
ret
<
0
)
{
if
(
ret
!=
AVERROR
(
EAGAIN
)
&&
ret
!=
link
->
status_in
)
ff_avfilter_link_set_in_status
(
link
,
ret
,
guess_status_pts
(
link
->
src
,
ret
));
ff_avfilter_link_set_in_status
(
link
,
ret
,
guess_status_pts
(
link
->
src
,
ret
,
link
->
time_base
));
if
(
ret
==
AVERROR_EOF
)
ret
=
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