summaryrefslogtreecommitdiff
path: root/ffmpeg_opt.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r--ffmpeg_opt.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 4d25fff410..6346ecf829 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -2008,12 +2008,28 @@ static int init_complex_filters(void)
static int configure_complex_filters(void)
{
- int i, ret = 0;
+ int i, j, ret = 0;
+
+ for (i = 0; i < nb_filtergraphs; i++) {
+ FilterGraph *fg = filtergraphs[i];
+
+ if (filtergraph_is_simple(fg))
+ continue;
- for (i = 0; i < nb_filtergraphs; i++)
- if (!filtergraph_is_simple(filtergraphs[i]) &&
- (ret = configure_filtergraph(filtergraphs[i])) < 0)
+ for (j = 0; j < fg->nb_inputs; j++) {
+ ret = ifilter_parameters_from_decoder(fg->inputs[j],
+ fg->inputs[j]->ist->dec_ctx);
+ if (ret < 0) {
+ av_log(NULL, AV_LOG_ERROR,
+ "Error initializing filtergraph %d input %d\n", i, j);
+ return ret;
+ }
+ }
+
+ ret = configure_filtergraph(filtergraphs[i]);
+ if (ret < 0)
return ret;
+ }
return 0;
}