rtpjitterbuffer: Minor cleanup

1. Add Null check in 'free_item' function.
2. Fix a typing error of comment.

https://bugzilla.gnome.org/show_bug.cgi?id=750965
This commit is contained in:
Sangkyu Park 2015-06-15 14:32:21 +09:00 committed by Sebastian Dröge
parent 717265ebfb
commit 6696bd62ef
2 changed files with 3 additions and 1 deletions

View file

@ -899,6 +899,8 @@ alloc_item (gpointer data, guint type, GstClockTime dts, GstClockTime pts,
static void
free_item (RTPJitterBufferItem * item)
{
g_return_if_fail (item != NULL);
if (item->data && item->type != ITEM_TYPE_QUERY)
gst_mini_object_unref (item->data);
g_slice_free (RTPJitterBufferItem, item);

View file

@ -741,7 +741,7 @@ rtp_jitter_buffer_insert (RTPJitterBuffer * jbuf, RTPJitterBufferItem * item,
case RTP_JITTER_BUFFER_MODE_NONE:
case RTP_JITTER_BUFFER_MODE_BUFFER:
/* send 0 as the first timestamp and -1 for the other ones. This will
* interpollate them from the RTP timestamps with a 0 origin. In buffering
* interpolate them from the RTP timestamps with a 0 origin. In buffering
* mode we will adjust the outgoing timestamps according to the amount of
* time we spent buffering. */
if (jbuf->base_time == -1)