| 760 | } |
| 761 | |
| 762 | static Frame *frame_queue_peek_readable(FrameQueue *f) |
| 763 | { |
| 764 | /* wait until we have a readable a new frame */ |
| 765 | SDL_LockMutex(f->mutex); |
| 766 | while (f->size - f->rindex_shown <= 0 && |
| 767 | !f->pktq->abort_request) { |
| 768 | SDL_CondWait(f->cond, f->mutex); |
| 769 | } |
| 770 | SDL_UnlockMutex(f->mutex); |
| 771 | |
| 772 | if (f->pktq->abort_request) |
| 773 | return NULL; |
| 774 | |
| 775 | return &f->queue[(f->rindex + f->rindex_shown) % f->max_size]; |
| 776 | } |
| 777 | |
| 778 | static void frame_queue_push(FrameQueue *f) |
| 779 | { |
no outgoing calls
no test coverage detected