From 6696bd62efde7db437c65b639d49da66b0b9795e Mon Sep 17 00:00:00 2001 From: Sangkyu Park Date: Mon, 15 Jun 2015 14:32:21 +0900 Subject: [PATCH] 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 --- gst/rtpmanager/gstrtpjitterbuffer.c | 2 ++ gst/rtpmanager/rtpjitterbuffer.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c index 1aabb0be04..89b1072fe2 100644 --- a/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/gst/rtpmanager/gstrtpjitterbuffer.c @@ -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); diff --git a/gst/rtpmanager/rtpjitterbuffer.c b/gst/rtpmanager/rtpjitterbuffer.c index f41b799c90..6ea4176389 100644 --- a/gst/rtpmanager/rtpjitterbuffer.c +++ b/gst/rtpmanager/rtpjitterbuffer.c @@ -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)