summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-02-13 22:59:55 +0100
committerLuca Barbato <lu_zero@gentoo.org>2011-02-14 21:00:25 +0100
commit70c275f8c335f9f8846af5cce65fef29247759b2 (patch)
treed640570f2c4c09921427ffdb0d69c68de18895fc
parentb08f59dca493e7582ddfd08097c594bfb0ae6ff9 (diff)
downloadffmpeg-streaming-70c275f8c335f9f8846af5cce65fef29247759b2.zip
ffmpeg-streaming-70c275f8c335f9f8846af5cce65fef29247759b2.tar.gz
Make avfilter_config_links() propagate audio information of the source link if it is not explicitely set by the filter.
-rw-r--r--libavfilter/avfilter.c6
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;
OpenPOWER on IntegriCloud