summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2014-01-15 09:47:03 +0100
committerWim Taymans <wtaymans@redhat.com>2014-01-21 15:00:53 +0100
commitc702e370911aaa77f92c23e8e0d9b2306cc1c4e0 (patch)
tree8ae9e9642254fdf2d1ed1cba1657aab923ee459c /tests
parent1a300eb50967e88ad73ffeeb44a84e268d4705b8 (diff)
tests: rtprtx::test_push_forward_seq: fix buffer refcounting
Diffstat (limited to 'tests')
-rw-r--r--tests/check/elements/rtprtx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/check/elements/rtprtx.c b/tests/check/elements/rtprtx.c
index cd313c4fc..bf4ded117 100644
--- a/tests/check/elements/rtprtx.c
+++ b/tests/check/elements/rtprtx.c
@@ -212,20 +212,21 @@ GST_START_TEST (test_push_forward_seq)
GstEvent *event = NULL;
GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
GstBuffer *buffer = (GstBuffer *) node->data;
- fail_unless (gst_pad_push (srcpad, buffer) == GST_FLOW_OK);
+
+ gst_buffer_ref (buffer);
+ fail_unless_equals_int (gst_pad_push (srcpad, buffer), GST_FLOW_OK);
if (i < 3) {
gst_rtp_buffer_map (buffer, GST_MAP_READ, &rtp);
-
event = gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
gst_structure_new ("GstRTPRetransmissionRequest",
"seqnum", G_TYPE_UINT, (guint) gst_rtp_buffer_get_seq (&rtp),
"ssrc", G_TYPE_UINT, (guint) gst_rtp_buffer_get_ssrc (&rtp),
"payload-type", G_TYPE_UINT,
(guint) gst_rtp_buffer_get_payload_type (&rtp), NULL));
+ gst_rtp_buffer_unmap (&rtp);
fail_unless (gst_pad_push_event (sinkpad, event));
- gst_rtp_buffer_unmap (&rtp);
}
gst_buffer_unref (buffer);
++i;