gst_rtsp_stream_transport_set_keepalive (tr, NULL, ctx->session, NULL);
gst_rtsp_transport_new (&ct);
- gst_rtsp_transport_init (ct);
map_transport (client, ct);
GST_WARNING_OBJECT (client, "Lowertrans is wrong");
goto error;
}
- g_free (ct->destination);
+
if (client->priv->ts_mode == WFD_TS_UDP) {
g_print ("\nSwitched to UDP !!!\n");
/* Free any previous TCP connection */
return res;
error:
+ gst_rtsp_transport_free (ct);
g_ptr_array_free (ta, FALSE);
return GST_RTSP_ERROR;
}
GstRTSPResult res = GST_RTSP_OK;
guint8 *data = NULL;
guint size = 0;
+ GstWFDResult wfd_res;
+ GstWFDMessage *msg = NULL;
GstRTSPWFDClient *_client = GST_RTSP_WFD_CLIENT (client);
GstRTSPWFDClientPrivate *priv = GST_RTSP_WFD_CLIENT_GET_PRIVATE (client);
GST_INFO_OBJECT (_client, "Response body is %d", size);
if (size > 0) {
if (!priv->m3_done) {
- GstWFDResult wfd_res;
- GstWFDMessage *msg = NULL;
/* Parse M3 response from sink */
wfd_res = gst_wfd_message_new (&msg);
if (wfd_res != GST_WFD_OK) {
ctx);
} else {
if (g_strrstr((char *)data, "wfd2_buffer_len")) {
- GstWFDResult wfd_res;
- GstWFDMessage *msg = NULL;
GST_DEBUG_OBJECT (_client, "Get TS message responce");
/* Parse TS response from sink */
}
}
+ if (msg != NULL)
+ gst_wfd_message_free(msg);
+
return;
error:
+
+ if (msg != NULL)
+ gst_wfd_message_free(msg);
+
return;
}
/* session ID doesn't have to be super-unique in this case */
sess_id = g_strdup_printf ("%u", g_random_int ());
- if (sink->conninfo.connection == NULL)
+ if (sink->conninfo.connection == NULL) {
+ g_free (sess_id);
return GST_RTSP_ERROR;
+ }
conn_socket = gst_rtsp_connection_get_read_socket (sink->conninfo.connection);