diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2007-11-07 14:20:40 +0000 |
---|---|---|
committer | Luca Abeni <lucabe72@email.it> | 2007-11-07 14:20:40 +0000 |
commit | b316aa1a1e71cd3bd34e006f695f43a38ece9f08 (patch) | |
tree | c3a8bf38890ceae203908071460a0eec28df5870 /libavformat/rtsp.c | |
parent | 346db900bf4cefe8ebefe7a51c01d80d6a7d2e3e (diff) | |
download | ffmpeg-streaming-b316aa1a1e71cd3bd34e006f695f43a38ece9f08.zip ffmpeg-streaming-b316aa1a1e71cd3bd34e006f695f43a38ece9f08.tar.gz |
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)
Originally committed as revision 10940 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 0857c5d..3dbb3e3 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -933,7 +933,7 @@ static int rtsp_read_header(AVFormatContext *s, /* 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; |