On 10/10/14 08:37, Rémi Denis-Courmont wrote:
Le 2014-10-09 23:17, Luca Barbato a écrit :
---
 libavformat/rtsp.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 646712e..cadf025 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1589,7 +1589,9 @@ void ff_rtsp_close_connections(AVFormatContext *s)
 int ff_rtsp_connect(AVFormatContext *s)
 {
     RTSPState *rt = s->priv_data;
-    char host[1024], path[1024], tcpname[1024], cmd[2048], auth[128];
+    char proto[128], host[1024], path[1024];
+    char tcpname[1024], cmd[2048], auth[128];
+    const char *lower_rtsp_proto = "tcp";
     int port, err, tcp_fd;
     RTSPMessageHeader reply1 = {0}, *reply = &reply1;
     int lower_transport_mask = 0;
@@ -1621,8 +1623,12 @@ int ff_rtsp_connect(AVFormatContext *s)
 redirect:
     lower_transport_mask = rt->lower_transport_mask;
     /* extract hostname and port */
-    av_url_split(NULL, 0, auth, sizeof(auth),
+    av_url_split(proto, sizeof(proto), auth, sizeof(auth),
                  host, sizeof(host), &port, path, sizeof(path),
s->filename);
+
+    if (!strcmp(proto, "rtsps"))
+        lower_rtsp_proto = "tls";

That seems much too simplistic to be rtsps. For a start, where is the
default RTSP/TLS port number (332)?

I'll update to 322 as you stated in 3/4, thanks for pointing out =)

More importantly, the user should expect that the media content proper
will be hashed and encrypted when using rtsps. This seems to merely
encrypt the control connection, which will fail that expectation. And of
course, it makes TLS arguably totally useless. So for the time being, I
think interleaved RTP should be forced (over TLS) and no other RTP
transport should be negotiated by the client.

I'll force the interleaving, keeping udp as default makes no sense.

lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to