webrtc: Actually make use of promise created one line before

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1042
This commit is contained in:
Sebastian Dröge 2019-12-31 12:41:25 +02:00 committed by Sebastian Dröge
parent 42b60627fa
commit 303a094779

View 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);