GstHarness *sink_harness = NULL;
guint i;
GstElement *rtpbin2;
+ GstBuffer *buf;
t->on_negotiation_needed = NULL;
t->on_ice_candidate = NULL;
g_mutex_unlock (&t->lock);
fail_unless (sink_harness->element == t->webrtc2);
+ /* Get one buffer out, this makes sure the capsfilter is primed and
+ * avoids races.
+ */
+ buf = gst_harness_pull (sink_harness);
+ fail_unless (buf != NULL);
+ gst_buffer_unref (buf);
+
gst_harness_set_sink_caps_str (sink_harness, OPUS_RTP_CAPS (100));
test_webrtc_reset_negotiation (t);