diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-11-03 14:53:58 +0100 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-11-03 14:53:58 +0100 |
commit | b6422902d84ec8df6f5a64ffd8743e93307bd8e9 (patch) | |
tree | 72f9c0209b0f26cf4c1b93f4238b5861005294ed /ffmpeg_opt.c | |
parent | 3932ccc472ad4f4d370dcfc1c2f574b0f3acb88c (diff) | |
parent | 722ec3eb35bc152ce91d0a4502eca0df1c0086d0 (diff) | |
download | ffmpeg-b6422902d84ec8df6f5a64ffd8743e93307bd8e9.tar.gz |
Merge commit '722ec3eb35bc152ce91d0a4502eca0df1c0086d0'
* commit '722ec3eb35bc152ce91d0a4502eca0df1c0086d0':
avconv: decouple configuring filtergraphs and setting input parameters
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r-- | ffmpeg_opt.c | 24 |
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; } |