[FFmpeg-devel] RTSP limited to one instance

Anuj Dev anuj.dev
Sun May 20 22:26:29 CEST 2007


A typo in the RTSP format handler will lock/loop if the first RTP port cannot be bound due to, for example, another instance of the same code.

Anuj



--- libavformat/rtsp.c  (revision 9081)
+++ libavformat/rtsp.c  (working copy)
@@ -908,10 +908,9 @@
             if (RTSP_RTP_PORT_MIN != 0) {
                 while(j <= RTSP_RTP_PORT_MAX) {
                     snprintf(buf, sizeof(buf), "rtp://?localport=%d", j);
-                    if (url_open(&rtsp_st->rtp_handle, buf, URL_RDWR) == 0) {
-                        j += 2; /* we will use two port by rtp stream (rtp and rtcp) */
+                    if (url_open(&rtsp_st->rtp_handle, buf, URL_RDWR) == 0)
                         goto rtp_opened;
-                    }
+                    j += 2; /* we will use two port by rtp stream (rtp and rtcp) */
                 }
             }
 




More information about the ffmpeg-devel mailing list