1
0
Fork 0

ffools/ffmpeg_filter: stop trying to handle an unreachable state

ifilter_send_eof() will fail if the input has no real or fallback
parameters, so there is no need to handle the case of some inputs being
in EOF state yet having no parameters.
This commit is contained in:
Anton Khirnov 2023-09-07 15:39:03 +02:00
parent 99567ee870
commit e35d36eb72
3 changed files with 6 additions and 8 deletions

View File

@ -944,7 +944,7 @@ static int choose_output(OutputStream **post)
INT64_MIN : ost->last_mux_dts;
}
if (!ost->initialized && !ost->inputs_done && !ost->finished) {
if (!ost->initialized && !ost->finished) {
ost_min = ost;
break;
}

View File

@ -583,8 +583,6 @@ typedef struct OutputStream {
// parameters are set in the AVStream.
int initialized;
int inputs_done;
const char *attachment_filename;
int keep_pix_fmt;

View File

@ -2081,11 +2081,11 @@ int fg_transcode_step(FilterGraph *graph, InputStream **best_ist)
}
}
// graph not configured, but all inputs are either initialized or EOF
for (int i = 0; i < graph->nb_outputs; i++)
graph->outputs[i]->ost->inputs_done = 1;
return 0;
// This state - graph is not configured, but all inputs are either
// initialized or EOF - should be unreachable because sending EOF to a
// filter without even a fallback format should fail
av_assert0(0);
return AVERROR_BUG;
}
*best_ist = NULL;