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

lucabe subversion
Wed Nov 7 15:20:41 CET 2007


Author: lucabe
Date: Wed Nov  7 15:20:40 2007
New Revision: 10940

Log:
Specify the server address when opening an rtp:// URL in rtsp.c, so
that the correct local address can be used for binding the socket.
Fixes rtsp:// URLs in ffplay on MacOS X

Patch by Ronald Bultje (rsbultje at gmail dot com)


Modified:
   trunk/libavformat/rtsp.c

Modified: trunk/libavformat/rtsp.c
==============================================================================
--- trunk/libavformat/rtsp.c	(original)
+++ trunk/libavformat/rtsp.c	Wed Nov  7 15:20:40 2007
@@ -933,7 +933,7 @@ static int rtsp_read_header(AVFormatCont
             /* first try in specified port range */
             if (RTSP_RTP_PORT_MIN != 0) {
                 while(j <= RTSP_RTP_PORT_MAX) {
-                    snprintf(buf, sizeof(buf), "rtp://?localport=%d", j);
+                    snprintf(buf, sizeof(buf), "rtp://%s?localport=%d", host, j);
                     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;




More information about the ffmpeg-cvslog mailing list