This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 321b0e36a33a23c68fbfb14559e555ea65646bd6
Author:     Niklas Haas <[email protected]>
AuthorDate: Fri May 15 17:54:33 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Sat May 23 08:41:12 2026 +0000

    fftools/thread_queue: add `flags` parameter to tq_receive()
    
    I want to use this to allow a non-blocking use of this function.
    
    Sponsored-by: nxtedition AB
    Signed-off-by: Niklas Haas <[email protected]>
---
 fftools/ffmpeg_sched.c | 8 ++++----
 fftools/thread_queue.c | 2 +-
 fftools/thread_queue.h | 5 ++++-
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/fftools/ffmpeg_sched.c b/fftools/ffmpeg_sched.c
index 201f708a9e..9070be614a 100644
--- a/fftools/ffmpeg_sched.c
+++ b/fftools/ffmpeg_sched.c
@@ -2228,7 +2228,7 @@ int sch_mux_receive(Scheduler *sch, unsigned mux_idx, 
AVPacket *pkt)
     av_assert0(mux_idx < sch->nb_mux);
     mux = &sch->mux[mux_idx];
 
-    ret = tq_receive(mux->queue, &stream_idx, pkt);
+    ret = tq_receive(mux->queue, &stream_idx, pkt, 0);
     pkt->stream_index = stream_idx;
     return ret;
 }
@@ -2322,7 +2322,7 @@ int sch_dec_receive(Scheduler *sch, unsigned dec_idx, 
AVPacket *pkt)
         dec->expect_end_ts = 0;
     }
 
-    ret = tq_receive(dec->queue, &dummy, pkt);
+    ret = tq_receive(dec->queue, &dummy, pkt, 0);
     av_assert0(dummy <= 0);
 
     // got a flush packet, on the next call to this function the decoder
@@ -2463,7 +2463,7 @@ int sch_enc_receive(Scheduler *sch, unsigned enc_idx, 
AVFrame *frame)
     av_assert0(enc_idx < sch->nb_enc);
     enc = &sch->enc[enc_idx];
 
-    ret = tq_receive(enc->queue, &dummy, frame);
+    ret = tq_receive(enc->queue, &dummy, frame, 0);
     av_assert0(dummy <= 0);
 
     return ret;
@@ -2579,7 +2579,7 @@ int sch_filter_receive(Scheduler *sch, unsigned fg_idx,
     while (1) {
         int ret, idx;
 
-        ret = tq_receive(fg->queue, &idx, frame);
+        ret = tq_receive(fg->queue, &idx, frame, 0);
         if (idx < 0)
             return AVERROR_EOF;
         else if (ret >= 0) {
diff --git a/fftools/thread_queue.c b/fftools/thread_queue.c
index eb33431c98..7568957a9c 100644
--- a/fftools/thread_queue.c
+++ b/fftools/thread_queue.c
@@ -194,7 +194,7 @@ static int receive_locked(ThreadQueue *tq, int *stream_idx,
     return nb_finished == tq->nb_streams ? AVERROR_EOF : AVERROR(EAGAIN);
 }
 
-int tq_receive(ThreadQueue *tq, int *stream_idx, void *data)
+int tq_receive(ThreadQueue *tq, int *stream_idx, void *data, int flags)
 {
     int ret;
 
diff --git a/fftools/thread_queue.h b/fftools/thread_queue.h
index ad7669f131..54de2b0845 100644
--- a/fftools/thread_queue.h
+++ b/fftools/thread_queue.h
@@ -74,6 +74,8 @@ void tq_choke(ThreadQueue *tq, int choked);
  *                   written here
  * @param data the data item will be written here on success using the
  *             callback provided to tq_alloc()
+ * @param flags currently unused
+ *
  * @return
  * - 0 a data item was successfully read; *stream_idx contains a non-negative
  *   stream index
@@ -81,7 +83,8 @@ void tq_choke(ThreadQueue *tq, int choked);
  *   side has marked the given stream as finished. This will happen at most 
once
  *   for each stream. When *stream_idx is -1, all streams are done.
  */
-int tq_receive(ThreadQueue *tq, int *stream_idx, void *data);
+int tq_receive(ThreadQueue *tq, int *stream_idx, void *data, int flags);
+
 /**
  * Mark the given stream finished from the receiving side.
  */

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to