diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-10 04:12:08 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-10 04:12:08 +0400 |
commit | 8e31dbc1dcb56d40bcc1dd45840aaef0d37bae51 (patch) | |
tree | 08342b8eede67521c32c139ebb4d9ddd04e871fa /libavformat/rtsp.c | |
parent | 1af9fdc3baa47596757da7c401d58710cef45c75 (diff) | |
parent | ffae713a5b3a0d20ff958d8bd58a052b495c38fd (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
Fix a bunch of common typos.
build: Skip compiling xvmc.h under the correct condition.
configure: darwin: Change dylib install names to include major version.
mpegts: Always honor a registration descriptor if present and there is no other codec information.
aacdec: Fix SCE parity check.
aacdec: Fix out of array writes (stack).
rtsp: Only set the ttl parameter if the server actually gave a value
udp: Set ttl for read-write streams, too, not only for write-only ones
udp: Only bind to the multicast address if in read-only mode
udp: Clarify the comment about binding the multicast address
udp: Reorder comments
Conflicts:
libavcodec/aacdec.c
tools/patcheck
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 023411c9f5..f2f69642ec 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1345,7 +1345,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, break; } case RTSP_LOWER_TRANSPORT_UDP_MULTICAST: { - char url[1024], namebuf[50]; + char url[1024], namebuf[50], optbuf[20] = ""; struct sockaddr_storage addr; int port, ttl; @@ -1358,10 +1358,12 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, port = rtsp_st->sdp_port; ttl = rtsp_st->sdp_ttl; } + if (ttl > 0) + snprintf(optbuf, sizeof(optbuf), "?ttl=%d", ttl); getnameinfo((struct sockaddr*) &addr, sizeof(addr), namebuf, sizeof(namebuf), NULL, 0, NI_NUMERICHOST); ff_url_join(url, sizeof(url), "rtp", NULL, namebuf, - port, "?ttl=%d", ttl); + port, "%s", optbuf); if (ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE, &s->interrupt_callback, NULL) < 0) { err = AVERROR_INVALIDDATA; |