diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-10-12 22:32:31 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-10-12 22:32:31 +0000 |
commit | cf5fe8ec9ec0c5b7489ff4ffe1d48eaf1e274d15 (patch) | |
tree | 07495ffb6389569edee013b8907e14abe36b03b6 /libavfilter/avfilter.c | |
parent | e259eadcabe188988c0a9696707791f3497738c2 (diff) | |
download | ffmpeg-cf5fe8ec9ec0c5b7489ff4ffe1d48eaf1e274d15.tar.gz |
Make avfilter_config_links() use the timebase of the first input link
of a filter for setting the output timebase, if there is such a link,
rather than always use AV_TIME_BASE_Q.
This fixes configuration for all the filters which do not use the
default config_props for the output link, and do not set explicitely
the timebase.
Originally committed as revision 25456 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index da28501e14..8842b4d147 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -182,7 +182,8 @@ int avfilter_config_links(AVFilterContext *filter) return ret; if (link->time_base.num == 0 && link->time_base.den == 0) - link->time_base = AV_TIME_BASE_Q; + link->time_base = link->src && link->src->input_count ? + link->src->inputs[0]->time_base : AV_TIME_BASE_Q; if ((config_link = link->dstpad->config_props)) if ((ret = config_link(link)) < 0) |