Commit 63166e79 authored by Benjamin Berg's avatar Benjamin Berg
Browse files

sink: Fix RTSP server attaching

The WFD sink did not store the source ID and both sinks did not detect
an attachment failure correctly.
parent 5b101e4a
......@@ -193,7 +193,7 @@ screencast_dummy_wfd_sink_sink_start_stream (ScreencastSink *sink)
self->server = wfd_server_new ();
self->server_source_id = gst_rtsp_server_attach (GST_RTSP_SERVER (self->server), NULL);
if (self->server_source_id < 0)
if (self->server_source_id == 0)
{
self->state = SCREENCAST_SINK_STATE_ERROR;
g_object_notify (G_OBJECT (self), "state");
......
......@@ -341,12 +341,14 @@ p2p_connected (GObject *source_object,
* XXX: Not yet implemented, but we should only bind on the P2P device
* wfd_server_set_interface (GST_RTSP_SERVER (sink->server), nm_device_get_ip_iface (sink->nm_device));
*/
if (gst_rtsp_server_attach (GST_RTSP_SERVER (sink->server), NULL) < 0)
{
screencast_wfd_p2p_sink_sink_stop_stream_int (sink);
sink->server_source_id = gst_rtsp_server_attach (GST_RTSP_SERVER (sink->server), NULL);
if (sink->server_source_id == 0)
{
sink->state = SCREENCAST_SINK_STATE_ERROR;
g_object_notify (G_OBJECT (sink), "state");
g_clear_object (&sink->server);
return;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment