mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
lavu/threadmessage: add av_thread_message_queue_nb_elems()
This commit is contained in:
parent
02e4970bc9
commit
71fa82bed6
5 changed files with 28 additions and 2 deletions
|
|
@ -130,7 +130,9 @@ static void *receiver_thread(void *arg)
|
|||
|
||||
for (i = 0; i < rd->workload; i++) {
|
||||
if (rand() % rd->workload < rd->workload / 10) {
|
||||
av_log(NULL, AV_LOG_INFO, "receiver #%d: flushing the queue\n", rd->id);
|
||||
av_log(NULL, AV_LOG_INFO, "receiver #%d: flushing the queue, "
|
||||
"discarding %d message(s)\n", rd->id,
|
||||
av_thread_message_queue_nb_elems(rd->queue));
|
||||
av_thread_message_flush(rd->queue);
|
||||
} else {
|
||||
struct message msg;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue