rtp: Fix GBytes memory leak in test

This commit is contained in:
Sebastian Dröge 2014-04-15 10:29:12 +02:00
parent f2ee068729
commit 29758da255

View file

@ -934,6 +934,7 @@ GST_START_TEST (test_rtp_buffer_get_payload_bytes)
gst_rtp_buffer_unmap (&rtp); gst_rtp_buffer_unmap (&rtp);
gst_buffer_unmap (buf, &map); gst_buffer_unmap (buf, &map);
gst_buffer_unref (buf); gst_buffer_unref (buf);
g_bytes_unref (gb);
/* create RTP buffer containing RTP packet */ /* create RTP buffer containing RTP packet */
buf = gst_buffer_new_and_alloc (sizeof (rtppacket)); buf = gst_buffer_new_and_alloc (sizeof (rtppacket));
@ -950,6 +951,7 @@ GST_START_TEST (test_rtp_buffer_get_payload_bytes)
fail_unless (data != NULL); fail_unless (data != NULL);
fail_unless (size == (sizeof (rtppacket) - RTP_HEADER_LEN)); fail_unless (size == (sizeof (rtppacket) - RTP_HEADER_LEN));
fail_unless_equals_string ("Hello", data); fail_unless_equals_string ("Hello", data);
g_bytes_unref (gb);
gst_rtp_buffer_unmap (&rtp); gst_rtp_buffer_unmap (&rtp);
gst_buffer_unmap (buf, &map); gst_buffer_unmap (buf, &map);