diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-02-13 22:59:55 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-14 23:37:34 +0100 |
commit | 6985d7bf873f4698caf3b54473f9aa89fabbd29a (patch) | |
tree | 2aea154dcd81660549aff72235a9c2a1b4ae2ad7 | |
parent | 1762d9ced70ccc46c5d3e5d64e56a48d0fbbd4f7 (diff) | |
download | ffmpeg-6985d7bf873f4698caf3b54473f9aa89fabbd29a.tar.gz |
Make avfilter_config_links() propagate audio information of the source link if it is not explicitely set by the filter.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavfilter/avfilter.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 872ca2384f..4d183294cb 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -198,6 +198,12 @@ int avfilter_config_links(AVFilterContext *filter) link->sample_aspect_ratio = link->src->input_count ? link->src->inputs[0]->sample_aspect_ratio : (AVRational){1,1}; + if (link->sample_rate == 0 && link->src && link->src->input_count) + link->sample_rate = link->src->inputs[0]->sample_rate; + + if (link->channel_layout == 0 && link->src && link->src->input_count) + link->channel_layout = link->src->inputs[0]->channel_layout; + if ((config_link = link->dstpad->config_props)) if ((ret = config_link(link)) < 0) return ret; |