#include "internal.h"
#include "network.h"
#include "os_support.h"
+#include "rtpproto.h"
#include "rtsp.h"
#include "rdt.h"
#include "url.h"
/* ff_url_join. No authorization by now (NULL) */
ff_url_join(rt->control_uri, sizeof(rt->control_uri), "rtsp", NULL, host,
port, "%s", path);
+
+ if (port < 0)
+ port = RTSP_DEFAULT_PORT;
+
/* Create TCP connection */
ff_url_join(tcpname, sizeof(tcpname), "tcp", NULL, host, port,
"?listen&listen_timeout=%d", rt->initial_timeout * 1000);
av_url_split(NULL, 0, NULL, 0, host, sizeof(host), &port, NULL, 0,
s->filename);
- ff_rtsp_undo_setup(s);
+ ff_rtsp_undo_setup(s, 0);
return ff_rtsp_make_setup_request(s, host, port, RTSP_LOWER_TRANSPORT_TCP,
rt->real_challenge);
}
rt->get_parameter_supported)) {
ff_rtsp_send_cmd_async(s, "GET_PARAMETER", rt->control_uri, NULL);
} else {
- ff_rtsp_send_cmd_async(s, "OPTIONS", "*", NULL);
+ ff_rtsp_send_cmd_async(s, "OPTIONS", rt->control_uri, NULL);
}
/* The stale flag should be reset when creating the auth response in
* ff_rtsp_send_cmd_async, but reset it here just in case we never