diff options
author | Clément Bœsch <u@pkh.me> | 2018-04-21 22:42:19 +0300 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2018-04-26 20:41:19 +0300 |
commit | 71fa82bed62f812d30aee26f3c6385e2ec890ebb (patch) | |
tree | c31086aa145158b69342c779a9e174dccb741e43 /tests/api | |
parent | 02e4970bc9d3215f862a5d64ec48922d98eb17c1 (diff) |
lavu/threadmessage: add av_thread_message_queue_nb_elems()
Diffstat (limited to 'tests/api')
-rw-r--r-- | tests/api/api-threadmessage-test.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/api/api-threadmessage-test.c b/tests/api/api-threadmessage-test.c index 05a8062b8c..3c693a70d1 100644 --- a/tests/api/api-threadmessage-test.c +++ b/tests/api/api-threadmessage-test.c @@ -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; |