summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2009-03-03 16:48:56 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2009-03-03 16:48:56 +0000
commit090438cc818feb631bbff3aab3cca7de3b349419 (patch)
treef92831673557d6860de9c6ec16dbf2bf5394a190 /libavformat/rtsp.c
parent9aaa2077e5879b153d2ce6bea2e42f0c349a083f (diff)
Recognize the "application" data type, which is required for WMS/UDP
sessions. This type is used in RTP/ASF (served by WMS servers), and is required to make UDP sessions work, but breaks TCP sessions. Therefore, we disable setup for application streams in TCP/WMS streams. See discussion in "[PATCH] RTSP-MS 8/15: fix RTSP-MS UDP" thread. Originally committed as revision 17776 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index a7bd0199ff..47656baa95 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -392,6 +392,8 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
codec_type = CODEC_TYPE_AUDIO;
} else if (!strcmp(st_type, "video")) {
codec_type = CODEC_TYPE_VIDEO;
+ } else if (!strcmp(st_type, "application")) {
+ codec_type = CODEC_TYPE_DATA;
} else {
s1->skip_media = 1;
return;
@@ -942,6 +944,12 @@ make_setup_request (AVFormatContext *s, const char *host, int port,
/* RTP/TCP */
else if (lower_transport == RTSP_LOWER_TRANSPORT_TCP) {
+ /** For WMS streams, the application streams are only used for
+ * UDP. When trying to set it up for TCP streams, the server
+ * will return an error. Therefore, we skip those streams. */
+ if (rt->server_type == RTSP_SERVER_WMS &&
+ s->streams[rtsp_st->stream_index]->codec->codec_type == CODEC_TYPE_DATA)
+ continue;
snprintf(transport, sizeof(transport) - 1,
"%s/TCP;", trans_pref);
if (rt->server_type == RTSP_SERVER_WMS)