rtpjitterbuffer: Minor cleanup
authorSangkyu Park <sk1122.park@samsung.com>
Mon, 15 Jun 2015 05:32:21 +0000 (14:32 +0900)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 15 Jun 2015 09:55:57 +0000 (11:55 +0200)
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
gst/rtpmanager/rtpjitterbuffer.c

index 1aabb0b..89b1072 100644 (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);
index f41b799..6ea4176 100644 (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)