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
c71e1e60
Commit
c71e1e60
authored
Jul 05, 2018
by
Gyan Doshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/setpts: add FR shorthand for FRAME_RATE
parent
115b7c96
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
filters.texi
doc/filters.texi
+1
-1
setpts.c
libavfilter/setpts.c
+4
-1
No files found.
doc/filters.texi
View file @
c71e1e60
...
...
@@ -19392,7 +19392,7 @@ The expression is evaluated through the eval API and can contain the following
constants:
@table @option
@item FRAME_RATE
@item FRAME_RATE
, FR
frame rate, only defined for constant frame-rate video
@item PTS
...
...
libavfilter/setpts.c
View file @
c71e1e60
...
...
@@ -57,6 +57,7 @@ static const char *const var_names[] = {
"RTCSTART"
,
///< wallclock (RTC) time at the start of the movie in micro seconds
"S"
,
// Number of samples in the current frame
"SR"
,
// Audio sample rate
"FR"
,
///< defined only for constant frame-rate video
NULL
};
...
...
@@ -81,6 +82,7 @@ enum var_name {
VAR_RTCSTART
,
VAR_S
,
VAR_SR
,
VAR_FR
,
VAR_VARS_NB
};
...
...
@@ -127,7 +129,8 @@ static int config_input(AVFilterLink *inlink)
setpts
->
var_values
[
VAR_SAMPLE_RATE
]
=
setpts
->
type
==
AVMEDIA_TYPE_AUDIO
?
inlink
->
sample_rate
:
NAN
;
setpts
->
var_values
[
VAR_FRAME_RATE
]
=
inlink
->
frame_rate
.
num
&&
setpts
->
var_values
[
VAR_FRAME_RATE
]
=
setpts
->
var_values
[
VAR_FR
]
=
inlink
->
frame_rate
.
num
&&
inlink
->
frame_rate
.
den
?
av_q2d
(
inlink
->
frame_rate
)
:
NAN
;
...
...
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