[FFmpeg-cvslog] fftools/thread_queue: count receive-finished streams as finished
Anton Khirnov
git at videolan.org
Tue Nov 14 19:19:58 EET 2023
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Oct 18 12:02:42 2023 +0200| [87016e031ffa2ed99d466e99a1d7fc68f7bdd8e7] | committer: Anton Khirnov
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.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=87016e031ffa2ed99d466e99a1d7fc68f7bdd8e7
---
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 */
More information about the ffmpeg-cvslog
mailing list