OSDN Git Service

Handle multiple RTSP transport options properly by adding all of them into the mask
authorMartin Storsjö <martin@martin.st>
Tue, 23 Mar 2010 08:00:37 +0000 (08:00 +0000)
committerMartin Storsjö <martin@martin.st>
Tue, 23 Mar 2010 08:00:37 +0000 (08:00 +0000)
Originally committed as revision 22644 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/rtsp.c

index 63103d0..12faf98 100644 (file)
@@ -1463,11 +1463,11 @@ redirect:
 
             /* handle the options */
             if (!strcmp(option, "udp")) {
-                lower_transport_mask = (1<< RTSP_LOWER_TRANSPORT_UDP);
+                lower_transport_mask |= (1<< RTSP_LOWER_TRANSPORT_UDP);
             } else if (!strcmp(option, "multicast")) {
-                lower_transport_mask = (1<< RTSP_LOWER_TRANSPORT_UDP_MULTICAST);
+                lower_transport_mask |= (1<< RTSP_LOWER_TRANSPORT_UDP_MULTICAST);
             } else if (!strcmp(option, "tcp")) {
-                lower_transport_mask = (1<< RTSP_LOWER_TRANSPORT_TCP);
+                lower_transport_mask |= (1<< RTSP_LOWER_TRANSPORT_TCP);
             } else {
                 /* Write options back into the buffer, using memmove instead
                  * of strcpy since the strings may overlap. */