aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-11-11 14:45:24 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2015-11-11 14:47:29 +0100
commit0b73d0ff0df7135332ef77e78b619b0822d248a8 (patch)
tree416ba3e466c541f11712af6d09dc959363ae00cb
parentb33d58c31f210d6409a54f3adb6e9a3d0c1642f6 (diff)
parent48ff6683ba5d40b629428673b1028e8ec542a9fa (diff)
downloadffmpeg-0b73d0ff0df7135332ef77e78b619b0822d248a8.tar.gz
Merge commit '48ff6683ba5d40b629428673b1028e8ec542a9fa'
* commit '48ff6683ba5d40b629428673b1028e8ec542a9fa': lavfi: add a frame_rate field to AVFilterLink. Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
-rw-r--r--libavfilter/avfilter.c5
-rw-r--r--libavfilter/avfilter.h5
2 files changed, 5 insertions, 5 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 7dc8b482be..c5c30448dc 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -275,10 +275,9 @@ int avfilter_config_links(AVFilterContext *filter)
link->sample_aspect_ratio = inlink ?
inlink->sample_aspect_ratio : (AVRational){1,1};
- if (inlink && !link->frame_rate.num && !link->frame_rate.den)
- link->frame_rate = inlink->frame_rate;
-
if (inlink) {
+ if (!link->frame_rate.num && !link->frame_rate.den)
+ link->frame_rate = inlink->frame_rate;
if (!link->w)
link->w = inlink->w;
if (!link->h)
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 5d4cd6ce12..7aac3cf934 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -445,11 +445,12 @@ struct AVFilterLink {
int age_index;
/**
- * Frame rate of the stream on the link, or 1/0 if unknown;
- * if left to 0/0, will be automatically be copied from the first input
+ * Frame rate of the stream on the link, or 1/0 if unknown or variable;
+ * if left to 0/0, will be automatically copied from the first input
* of the source filter if it exists.
*
* Sources should set it to the best estimation of the real frame rate.
+ * If the source frame rate is unknown or variable, set this to 1/0.
* Filters should update it if necessary depending on their function.
* Sinks can use it to set a default output frame rate.
* It is similar to the r_frame_rate field in AVStream.