]> git.sesse.net Git - ffmpeg/commitdiff
lavfi: add a frame_rate field to AVFilterLink.
authorNicolas George <nicolas.george@normalesup.org>
Tue, 3 Nov 2015 17:57:17 +0000 (09:57 -0800)
committerAnton Khirnov <anton@khirnov.net>
Mon, 9 Nov 2015 07:09:34 +0000 (08:09 +0100)
(cherry picked from ffmpeg commit 7b42036b3b23c85f473bf9369e37fa8da22eaf93)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
doc/APIchanges
libavfilter/avfilter.c
libavfilter/avfilter.h
libavfilter/version.h

index d301bd5fac9a0fcec4f5ba0851a3851164fcdf6e..cc48b5109db789fe7e1c20977ee3be47c9ea315d 100644 (file)
@@ -12,6 +12,9 @@ libavutil:     2015-08-28
 
 
 API changes, most recent first:
+2015-11-xx - xxxxxxx - lavfi 6.1.0 - avfilter.h
+    Add a frame_rate field to AVFilterLink
+
 2015-xx-xx - xxxxxxx - lavc 57.6.0 - avcodec.h
 
 2015-xx-xx - lavc 57.7.0 - avcodec.h
index 64b26457f566a6163161f32ea9993abb58b9e4b5..cd98d16220691d4c7b537ee4351e958b93c55300 100644 (file)
@@ -195,6 +195,8 @@ int avfilter_config_links(AVFilterContext *filter)
                         link->src->inputs[0]->sample_aspect_ratio : (AVRational){1,1};
 
                 if (link->src->nb_inputs) {
+                    if (!link->frame_rate.num && !link->frame_rate.den)
+                        link->frame_rate = link->src->inputs[0]->frame_rate;
                     if (!link->w)
                         link->w = link->src->inputs[0]->w;
                     if (!link->h)
index 9dbfeea9eb6e70dd269a3e9ba4d1744d78162dea..18908583a2b13d891205f65383f44c03475f78e1 100644 (file)
@@ -375,6 +375,18 @@ struct AVFilterLink {
         AVLINK_STARTINIT,       ///< started, but incomplete
         AVLINK_INIT             ///< complete
     } init_state;
+
+    /**
+     * 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 real constant 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.
+     */
+    AVRational frame_rate;
 };
 
 /**
index 3cbd8f85b460e116a717a64c79603f5f1d7071d3..884cfa0c9cf9286ed896a9c8d8cf81950de5724b 100644 (file)
@@ -30,7 +30,7 @@
 #include "libavutil/version.h"
 
 #define LIBAVFILTER_VERSION_MAJOR  6
-#define LIBAVFILTER_VERSION_MINOR  0
+#define LIBAVFILTER_VERSION_MINOR  1
 #define LIBAVFILTER_VERSION_MICRO  0
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \