webrtc: Actually make use of promise created one line before
authorSebastian Dröge <sebastian@centricular.com>
Tue, 31 Dec 2019 10:41:25 +0000 (12:41 +0200)
committerSebastian Dröge <slomo@coaxion.net>
Tue, 31 Dec 2019 11:19:20 +0000 (11:19 +0000)
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1042

tests/examples/webrtc/webrtcbidirectional.c

index 2b8bf11..13acc86 100644 (file)
@@ -99,7 +99,7 @@ _on_answer_received (GstPromise * promise, gpointer user_data)
   /* this is another way to tell webrtcbin that we don't want to be notified
    * when this task is complete: interrupt the promise */
   promise = gst_promise_new ();
-  g_signal_emit_by_name (webrtc2, "set-local-description", answer, NULL);
+  g_signal_emit_by_name (webrtc2, "set-local-description", answer, promise);
   gst_promise_interrupt (promise);
   gst_promise_unref (promise);