aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg_opt.c
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2016-08-03 20:53:03 -0700
committerTimothy Gu <timothygu99@gmail.com>2016-08-03 20:53:03 -0700
commit1b04ea1a6c237a94f81d1b8f8a42fae46fbeacab (patch)
tree1219a7d01b489d4701bd06be9459c7725a208378 /ffmpeg_opt.c
parent9aa3023672b3336968cbdb5c4a733b6088ad564e (diff)
parent73c6ec6d659bab11ac424a4ba6ce3a56246295ee (diff)
downloadffmpeg-1b04ea1a6c237a94f81d1b8f8a42fae46fbeacab.tar.gz
Merge commit '73c6ec6d659bab11ac424a4ba6ce3a56246295ee' into merge
* commit '73c6ec6d659bab11ac424a4ba6ce3a56246295ee': avconv: create simple filtergraphs earlier Merged-by: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r--ffmpeg_opt.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 68bd090c57..d995b528f6 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -1923,7 +1923,7 @@ static int configure_complex_filters(void)
int i, ret = 0;
for (i = 0; i < nb_filtergraphs; i++)
- if (!filtergraphs[i]->graph &&
+ if (!filtergraph_is_simple(filtergraphs[i]) &&
(ret = configure_filtergraph(filtergraphs[i])) < 0)
return ret;
return 0;
@@ -2290,7 +2290,7 @@ loop_end:
}
av_dict_free(&unused_opts);
- /* set the encoding/decoding_needed flags */
+ /* set the encoding/decoding_needed flags and create simple filtergraphs*/
for (i = of->ost_index; i < nb_output_streams; i++) {
OutputStream *ost = output_streams[i];
@@ -2298,6 +2298,18 @@ loop_end:
if (ost->encoding_needed && ost->source_index >= 0) {
InputStream *ist = input_streams[ost->source_index];
ist->decoding_needed |= DECODING_FOR_OST;
+
+ if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO ||
+ ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
+ err = init_simple_filtergraph(ist, ost);
+ if (err < 0) {
+ av_log(NULL, AV_LOG_ERROR,
+ "Error initializing a simple filtergraph between streams "
+ "%d:%d->%d:%d\n", ist->file_index, ost->source_index,
+ nb_output_files - 1, ost->st->index);
+ exit_program(1);
+ }
+ }
}
}