You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
fftools/ffmpeg_filter: use InputFilterPriv.eof instead of InputFile.eof_reached
The two checks using eof_reached are testing whether more input can possibly appear on this filtergraph input. InputFilterPriv.eof is the more authoritative source for this information.
This commit is contained in:
@@ -1620,7 +1620,6 @@ int fg_transcode_step(FilterGraph *graph, InputStream **best_ist)
|
|||||||
{
|
{
|
||||||
int i, ret;
|
int i, ret;
|
||||||
int nb_requests, nb_requests_max = 0;
|
int nb_requests, nb_requests_max = 0;
|
||||||
InputFilter *ifilter;
|
|
||||||
InputStream *ist;
|
InputStream *ist;
|
||||||
|
|
||||||
if (!graph->graph && ifilter_has_all_input_formats(graph)) {
|
if (!graph->graph && ifilter_has_all_input_formats(graph)) {
|
||||||
@@ -1637,7 +1636,8 @@ int fg_transcode_step(FilterGraph *graph, InputStream **best_ist)
|
|||||||
if (!graph->graph) {
|
if (!graph->graph) {
|
||||||
for (int i = 0; i < graph->nb_inputs; i++) {
|
for (int i = 0; i < graph->nb_inputs; i++) {
|
||||||
InputFilter *ifilter = graph->inputs[i];
|
InputFilter *ifilter = graph->inputs[i];
|
||||||
if (!ifilter->ist->got_output && !input_files[ifilter->ist->file_index]->eof_reached) {
|
InputFilterPriv *ifp = ifp_from_ifilter(ifilter);
|
||||||
|
if (!ifilter->ist->got_output && !ifp->eof) {
|
||||||
*best_ist = ifilter->ist;
|
*best_ist = ifilter->ist;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1665,10 +1665,11 @@ int fg_transcode_step(FilterGraph *graph, InputStream **best_ist)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
for (i = 0; i < graph->nb_inputs; i++) {
|
for (i = 0; i < graph->nb_inputs; i++) {
|
||||||
ifilter = graph->inputs[i];
|
InputFilter *ifilter = graph->inputs[i];
|
||||||
|
InputFilterPriv *ifp = ifp_from_ifilter(ifilter);
|
||||||
|
|
||||||
ist = ifilter->ist;
|
ist = ifilter->ist;
|
||||||
if (input_files[ist->file_index]->eagain ||
|
if (input_files[ist->file_index]->eagain || ifp->eof)
|
||||||
input_files[ist->file_index]->eof_reached)
|
|
||||||
continue;
|
continue;
|
||||||
nb_requests = av_buffersrc_get_nb_failed_requests(ifilter->filter);
|
nb_requests = av_buffersrc_get_nb_failed_requests(ifilter->filter);
|
||||||
if (nb_requests > nb_requests_max) {
|
if (nb_requests > nb_requests_max) {
|
||||||
|
Reference in New Issue
Block a user