[FFmpeg-cvslog] r17776 - trunk/libavformat/rtsp.c

rbultje subversion
Tue Mar 3 17:48:57 CET 2009


Author: rbultje
Date: Tue Mar  3 17:48:56 2009
New Revision: 17776

Log:
Recognize the "application" data type, which is used at least in ASF/RTP
streams. However, at the same time, setup of this stream might be required
for UDP-sessions to work correctly, at the same time it will cause TCP
sessions to barf. Therefore, add a special case to the TCP code to skip
setup of these application streams when we are dealing with WMS servers.

See discussion in "[PATCH] RTSP-MS 8/15: fix RTSP-MS UDP" thread.

Modified:
   trunk/libavformat/rtsp.c

Modified: trunk/libavformat/rtsp.c
==============================================================================
--- trunk/libavformat/rtsp.c	Tue Mar  3 17:19:37 2009	(r17775)
+++ trunk/libavformat/rtsp.c	Tue Mar  3 17:48:56 2009	(r17776)
@@ -392,6 +392,8 @@ static void sdp_parse_line(AVFormatConte
             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, 
 
         /* 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)




More information about the ffmpeg-cvslog mailing list