diff options
Diffstat (limited to 'toxav')
-rw-r--r-- | toxav/rtp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/toxav/rtp.c b/toxav/rtp.c index 8cead4c9..ba8d3e84 100644 --- a/toxav/rtp.c +++ b/toxav/rtp.c | |||
@@ -603,10 +603,11 @@ int rtp_release_session_recv ( RTPSession *session ) | |||
603 | */ | 603 | */ |
604 | void rtp_queue_adjust_limit(RTPSession *session, uint64_t limit) | 604 | void rtp_queue_adjust_limit(RTPSession *session, uint64_t limit) |
605 | { | 605 | { |
606 | RTPMessage *_tmp, * _it; | ||
607 | pthread_mutex_lock(&session->mutex); | 606 | pthread_mutex_lock(&session->mutex); |
607 | |||
608 | RTPMessage *_tmp, * _it = session->oldest_msg; | ||
608 | 609 | ||
609 | for ( _it = session->oldest_msg; session->queue_size > limit; _it = _tmp ) { | 610 | for ( ; session->queue_size > limit; _it = _tmp ) { |
610 | _tmp = _it->next; | 611 | _tmp = _it->next; |
611 | rtp_free_msg( session, _it); | 612 | rtp_free_msg( session, _it); |
612 | session->queue_size --; | 613 | session->queue_size --; |