changeset 2711:0ff7c5289e68 libavformat

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)
author lucabe
date Wed, 07 Nov 2007 14:20:40 +0000
parents 00ffc2f02705
children 53b9a531f490
files rtsp.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rtsp.c	Wed Nov 07 08:34:00 2007 +0000
+++ b/rtsp.c	Wed Nov 07 14:20:40 2007 +0000
@@ -933,7 +933,7 @@
             /* 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;