diff options
author | Gyan Doshi <ffmpeg@gyani.pro> | 2018-07-05 15:24:55 +0530 |
---|---|---|
committer | Gyan Doshi <ffmpeg@gyani.pro> | 2018-07-07 21:08:08 +0530 |
commit | c71e1e60305669c225c696dd99f6db5dc550a56a (patch) | |
tree | 1f1e791b5cea26f48db494a7d7fc9f003efd1399 /libavfilter/setpts.c | |
parent | 115b7c96e9e8823e5c8a8bc2137be8e2038befcd (diff) |
avfilter/setpts: add FR shorthand for FRAME_RATE
Diffstat (limited to 'libavfilter/setpts.c')
-rw-r--r-- | libavfilter/setpts.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c index 4505498bf3..800ba6a83f 100644 --- a/libavfilter/setpts.c +++ b/libavfilter/setpts.c @@ -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; |