summaryrefslogtreecommitdiff
path: root/toxav/rtp.c
diff options
context:
space:
mode:
authormannol <eniz_vukovic@hotmail.com>2014-06-20 00:23:05 +0200
committermannol <eniz_vukovic@hotmail.com>2014-06-20 00:23:05 +0200
commit88a131a2e8ea0780f9719f18970ee581c32724b5 (patch)
tree6be982d4dac2c2db5504a57c1e47ca46d58b8315 /toxav/rtp.c
parent9b2d3e50b20f4aeaca059b951bd7079c0b554233 (diff)
Fixed bug when adjusting queue size
Diffstat (limited to 'toxav/rtp.c')
-rw-r--r--toxav/rtp.c5
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 */
604void rtp_queue_adjust_limit(RTPSession *session, uint64_t limit) 604void 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 --;