[FFmpeg-cvslog] Make avfilter_config_links() propagate audio information of the source link if it is not explicitely set by the filter .
Stefano Sabatini
git
Mon Feb 14 23:49:36 CET 2011
ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Sun Feb 13 22:59:55 2011 +0100| [6985d7bf873f4698caf3b54473f9aa89fabbd29a] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6985d7bf873f4698caf3b54473f9aa89fabbd29a
---
libavfilter/avfilter.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 872ca23..4d18329 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;
More information about the ffmpeg-cvslog
mailing list