[FFmpeg-devel] [PATCH] lavfi: in avfilter_config_links(), always propagate time_base information

Stefano Sabatini stefano.sabatini-lala at poste.it
Fri Aug 19 00:52:42 CEST 2011


time_base is used not only for configuring video links, but also for
audio links.
---
 libavfilter/avfilter.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 23bb26c..13a7fdb 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -262,12 +262,12 @@ int avfilter_config_links(AVFilterContext *filter)
             } else if ((ret = config_link(link)) < 0)
                 return ret;
 
+            if (!link->time_base.num && !link->time_base.den)
+                link->time_base = link->src->input_count ?
+                    link->src->inputs[0]->time_base : AV_TIME_BASE_Q;
+
             switch (link->type) {
             case AVMEDIA_TYPE_VIDEO:
-                if (!link->time_base.num && !link->time_base.den)
-                    link->time_base = link->src->input_count ?
-                        link->src->inputs[0]->time_base : AV_TIME_BASE_Q;
-
                 if (!link->sample_aspect_ratio.num && !link->sample_aspect_ratio.den)
                     link->sample_aspect_ratio = link->src->input_count ?
                         link->src->inputs[0]->sample_aspect_ratio : (AVRational){1,1};
-- 
1.7.2.5



More information about the ffmpeg-devel mailing list