rtpjitterbuffer: use NULL to ignore percent

If we pass NULL to pop and push we ignore the percent result.
This commit is contained in:
Wim Taymans 2013-07-30 18:52:58 +02:00
parent b3e8a85a54
commit ea931d4f57

View file

@ -695,7 +695,7 @@ rtp_jitter_buffer_insert (RTPJitterBuffer * jbuf, GstBuffer * buf,
/* buffering mode, update buffer stats */
if (jbuf->mode == RTP_JITTER_BUFFER_MODE_BUFFER)
update_buffer_level (jbuf, percent);
else
else if (percent)
*percent = -1;
/* tail was changed when we did not find a previous packet, we set the return
@ -739,7 +739,7 @@ rtp_jitter_buffer_pop (RTPJitterBuffer * jbuf, gint * percent)
/* buffering mode, update buffer stats */
if (jbuf->mode == RTP_JITTER_BUFFER_MODE_BUFFER)
update_buffer_level (jbuf, percent);
else
else if (percent)
*percent = -1;
return buf;