Commit 95c4356c authored by lucabe's avatar lucabe

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)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10940 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 3ba2f39a
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment