mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
tests: rtprtx::test_push_forward_seq: fix buffer refcounting
This commit is contained in:
parent
1a300eb509
commit
c702e37091
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue