aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-10-18 12:02:42 +0200
committerAnton Khirnov <anton@khirnov.net>2023-11-14 18:18:26 +0100
commit87016e031ffa2ed99d466e99a1d7fc68f7bdd8e7 (patch)
tree421b0a107840a9c6a4a04c6c25aaf1e1891b398f
parent4f7b91a6980d4d593ce0bf5ae398996f878a18e2 (diff)
downloadffmpeg-87016e031ffa2ed99d466e99a1d7fc68f7bdd8e7.tar.gz
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.
-rw-r--r--fftools/thread_queue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fftools/thread_queue.c b/fftools/thread_queue.c
index feac6a7748..fd73cc0a9b 100644
--- a/fftools/thread_queue.c
+++ b/fftools/thread_queue.c
@@ -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 */