[FFmpeg-devel] [PATCH 06/24] fftools/thread_queue: count receive-finished streams as finished
Anton Khirnov
anton at khirnov.net
Sat Nov 4 09:56:15 EET 2023
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.
---
fftools/thread_queue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 */
--
2.42.0
More information about the ffmpeg-devel
mailing list