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
bb56436c
Commit
bb56436c
authored
Nov 28, 2012
by
Anton Khirnov
Committed by
Michael Niedermayer
Nov 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
f_settb: switch to filter_frame
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
eb1424b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
24 deletions
+6
-24
f_settb.c
libavfilter/f_settb.c
+6
-24
No files found.
libavfilter/f_settb.c
View file @
bb56436c
...
...
@@ -103,37 +103,20 @@ static int config_output_props(AVFilterLink *outlink)
return
0
;
}
static
int
start_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
picref
)
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
frame
)
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
AVFilterLink
*
outlink
=
ctx
->
outputs
[
0
];
if
(
av_cmp_q
(
inlink
->
time_base
,
outlink
->
time_base
))
{
int64_t
orig_pts
=
picref
->
pts
;
picref
->
pts
=
av_rescale_q
(
picref
->
pts
,
inlink
->
time_base
,
outlink
->
time_base
);
int64_t
orig_pts
=
frame
->
pts
;
frame
->
pts
=
av_rescale_q
(
frame
->
pts
,
inlink
->
time_base
,
outlink
->
time_base
);
av_log
(
ctx
,
AV_LOG_DEBUG
,
"tb:%d/%d pts:%"
PRId64
" -> tb:%d/%d pts:%"
PRId64
"
\n
"
,
inlink
->
time_base
.
num
,
inlink
->
time_base
.
den
,
orig_pts
,
outlink
->
time_base
.
num
,
outlink
->
time_base
.
den
,
picref
->
pts
);
outlink
->
time_base
.
num
,
outlink
->
time_base
.
den
,
frame
->
pts
);
}
inlink
->
cur_buf
=
NULL
;
return
ff_start_frame
(
outlink
,
picref
);
}
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
samplesref
)
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
AVFilterLink
*
outlink
=
ctx
->
outputs
[
0
];
if
(
av_cmp_q
(
inlink
->
time_base
,
outlink
->
time_base
))
{
int64_t
orig_pts
=
samplesref
->
pts
;
samplesref
->
pts
=
av_rescale_q
(
samplesref
->
pts
,
inlink
->
time_base
,
outlink
->
time_base
);
av_log
(
ctx
,
AV_LOG_DEBUG
,
"tb:%d/%d pts:%"
PRId64
" -> tb:%d/%d pts:%"
PRId64
"
\n
"
,
inlink
->
time_base
.
num
,
inlink
->
time_base
.
den
,
orig_pts
,
outlink
->
time_base
.
num
,
outlink
->
time_base
.
den
,
samplesref
->
pts
);
}
return
ff_filter_frame
(
outlink
,
samplesref
);
return
ff_filter_frame
(
outlink
,
frame
);
}
#if CONFIG_SETTB_FILTER
...
...
@@ -142,8 +125,7 @@ static const AVFilterPad avfilter_vf_settb_inputs[] = {
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
get_video_buffer
=
ff_null_get_video_buffer
,
.
start_frame
=
start_frame
,
.
end_frame
=
ff_null_end_frame
.
filter_frame
=
filter_frame
,
},
{
NULL
}
};
...
...
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