Reap buffers stored in the buffer sinks even when
the avfilter_graph_request_oldest() loop only returns EOF.
avfilter_graph_request_oldest() can cause frames to arrive
to the sinks even when it returns EOF.
AVFilterBufferRef *picref;
AVFrame *filtered_frame = NULL;
int i, ret, ret_all;
- unsigned nb_success, nb_eof;
+ unsigned nb_success = 1, av_uninit(nb_eof);
int64_t frame_pts;
while (1) {
avfilter_unref_buffer(picref);
}
}
+ if (!nb_success) /* from last round */
+ break;
/* Request frames through all the graphs */
ret_all = nb_success = nb_eof = 0;
for (i = 0; i < nb_filtergraphs; i++) {
ret_all = ret;
}
}
- if (!nb_success)
- break;
/* Try again if anything succeeded */
}
return nb_eof == nb_filtergraphs ? AVERROR_EOF : ret_all;