This one is tricky. Consider a graph with two sink links, A and B. request_oldest() requests on A, and A returns EOF. This EOF causes a filter to flush pending frames to B; they are unrequested. Then request_oldest() moves on to B, and B returns EOF.
Unified · Split
| @@ -255,6 +255,12 @@ char *avfilter_graph_dump(AVFilterGraph *graph, const char *options); · 254 unmodified lines | ||
| 255 | 255 | * of a filtergraph, only a convenience function to help drain a filtergraph |
| 256 | 256 | * in a balanced way under normal circumstances. |
| 257 | 257 | * |
| 258 | + * Also note that AVERROR_EOF does not mean that frames did not arrive on | |
| 259 | + * some of the sinks during the process. | |
| 260 | + * When there are multiple sink links, in case the requested link | |
| 261 | + * returns an EOF, this may cause a filter to flush pending frames | |
| 262 | + * which are sent to another sink link, although unrequested. | |
| 263 | + * | |
| 258 | 264 | * @return the return value of ff_request_frame, |
| 259 | 265 | * or AVERROR_EOF of all links returned AVERROR_EOF. |
| 260 | 266 | */ |