fftools/thread_queue: count receive-finished streams as finished

This ensures that tq_receive() will always return EOF after all streams
were receive-finished, even though the sending side might not have
closed them yet. This may allow the receiver to avoid manually tracking
which streams it has already closed.
This commit is contained in:
Anton Khirnov 2023-10-18 12:02:42 +02:00
parent 4f7b91a698
commit 87016e031f

View File

@ -177,7 +177,7 @@ static int receive_locked(ThreadQueue *tq, int *stream_idx,
}
for (unsigned int i = 0; i < tq->nb_streams; i++) {
if (!(tq->finished[i] & FINISHED_SEND))
if (!tq->finished[i])
continue;
/* return EOF to the consumer at most once for each stream */