summaryrefslogtreecommitdiff
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorZhao Zhili <wantlamy@gmail.com>2016-01-07 18:55:50 +0800
committerMichael Niedermayer <michael@niedermayer.cc>2016-03-07 02:29:41 +0100
commit6f5048f4a0f702d92794dda7752c20ed6033233b (patch)
treea7f89140d9ed8cf9897aeb820ab6c78751c5160e /libavformat/rtsp.c
parent86db71b402e9f6b5782e1110ece4cb35c525d4b0 (diff)
downloadffmpeg-6f5048f4a0f702d92794dda7752c20ed6033233b.tar.gz
rtp: Fix play multiple multicast streams with the same port
We cannot play multiple multicast streams with the same port at the same time. This is because both rtp and rtcp port are opened in read-write mode, so they will not bind to the multicast address. Try to make rtp port as read-only by default to solve this bug. Signed-off-by: Zhao Zhili <wantlamy@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 64f8c91950..485e35626d 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -2316,7 +2316,7 @@ static int sdp_read_header(AVFormatContext *s)
append_source_addrs(url, sizeof(url), "block",
rtsp_st->nb_exclude_source_addrs,
rtsp_st->exclude_source_addrs);
- err = ffurl_open_whitelist(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE,
+ err = ffurl_open_whitelist(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ,
&s->interrupt_callback, &opts, s->protocol_whitelist, s->protocol_blacklist);
av_dict_free(&opts);