avconv: Make sure that inputless filtergraphs are configured

Unbreak `avconv -filter_complex testsrc`.

Regression introduced in a3a0230a98
This commit is contained in:
Luca Barbato 2016-08-03 04:21:41 +02:00
parent 602abe77b0
commit f6d2fed811
1 changed files with 9 additions and 0 deletions

View File

@ -766,6 +766,15 @@ static int poll_filters(void)
for (i = 0; i < nb_output_streams; i++) {
int64_t pts = output_streams[i]->sync_opts;
if (output_streams[i]->filter && !output_streams[i]->filter->graph->graph &&
!output_streams[i]->filter->graph->nb_inputs) {
ret = configure_filtergraph(output_streams[i]->filter->graph);
if (ret < 0) {
av_log(NULL, AV_LOG_ERROR, "Error reinitializing filters!\n");
return ret;
}
}
if (!output_streams[i]->filter || output_streams[i]->finished ||
!output_streams[i]->filter->graph->graph)
continue;