rtsp: Specify unicast for TCP interleaved streams, too
authorMartin Storsjö <martin@martin.st>
Mon, 21 Mar 2011 12:19:09 +0000 (14:19 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Mon, 21 Mar 2011 19:58:33 +0000 (20:58 +0100)
According to the RFC, the default is multicast if nothing is
specified, which doesn't make sense for TCP.

According to a bug report, some Axis camera models give a
"400 Bad Request" error if this is omitted.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavformat/rtsp.c

index 6d538cd..5b98a28 100644 (file)
@@ -1157,7 +1157,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
                 continue;
             snprintf(transport, sizeof(transport) - 1,
                      "%s/TCP;", trans_pref);
-            if (rt->server_type == RTSP_SERVER_WMS)
+            if (rt->transport != RTSP_TRANSPORT_RDT)
                 av_strlcat(transport, "unicast;", sizeof(transport));
             av_strlcatf(transport, sizeof(transport),
                         "interleaved=%d-%d",