Lines Matching refs:rmq
47 AVThreadMessageQueue *rmq;
52 if (!(rmq = av_mallocz(sizeof(*rmq))))
54 if ((ret = pthread_mutex_init(&rmq->lock, NULL))) {
55 av_free(rmq);
58 if ((ret = pthread_cond_init(&rmq->cond_recv, NULL))) {
59 pthread_mutex_destroy(&rmq->lock);
60 av_free(rmq);
63 if ((ret = pthread_cond_init(&rmq->cond_send, NULL))) {
64 pthread_cond_destroy(&rmq->cond_recv);
65 pthread_mutex_destroy(&rmq->lock);
66 av_free(rmq);
69 if (!(rmq->fifo = av_fifo_alloc2(nelem, elsize, 0))) {
70 pthread_cond_destroy(&rmq->cond_send);
71 pthread_cond_destroy(&rmq->cond_recv);
72 pthread_mutex_destroy(&rmq->lock);
73 av_free(rmq);
76 rmq->elsize = elsize;
77 *mq = rmq;