MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / av_thread_message_flush

Function av_thread_message_flush

libavutil/threadmessage.c:226–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224#endif
225
226void av_thread_message_flush(AVThreadMessageQueue *mq)
227{
228#if HAVE_THREADS
229 size_t used;
230
231 pthread_mutex_lock(&mq->lock);
232 used = av_fifo_can_read(mq->fifo);
233 if (mq->free_func)
234 av_fifo_read_to_cb(mq->fifo, free_func_wrap, mq, &used);
235 /* only the senders need to be notified since the queue is empty and there
236 * is nothing to read */
237 pthread_cond_broadcast(&mq->cond_send);
238 pthread_mutex_unlock(&mq->lock);
239#endif /* HAVE_THREADS */
240}

Callers 4

fifo_consumer_threadFunction · 0.85
sender_threadFunction · 0.85
receiver_threadFunction · 0.85

Calls 5

av_fifo_can_readFunction · 0.85
av_fifo_read_to_cbFunction · 0.85
pthread_mutex_lockFunction · 0.50
pthread_cond_broadcastFunction · 0.50
pthread_mutex_unlockFunction · 0.50

Tested by 2

sender_threadFunction · 0.68
receiver_threadFunction · 0.68