[FFmpeg-devel] [PATCH 1/1] libavformat/rtsp: Pass protocol options for udp multicast

Wolfgang Haupt haupt.wolfgang at gmail.com
Fri Apr 3 09:53:50 EEST 2020


Protocol options like buffer_size need to be passed to the
underlying transport implementation for udp multicasts as well.
---
 libavformat/rtsp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index a69484d78b..dbf626eb13 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1616,6 +1616,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
             char url[1024], namebuf[50], optbuf[20] = "";
             struct sockaddr_storage addr;
             int port, ttl;
+            AVDictionary *opts = map_to_opts(rt);
 
             if (reply->transports[0].destination.ss_family) {
                 addr      = reply->transports[0].destination;
@@ -1633,10 +1634,12 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
             ff_url_join(url, sizeof(url), "rtp", NULL, namebuf,
                         port, "%s", optbuf);
             if (ffurl_open_whitelist(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE,
-                           &s->interrupt_callback, NULL, s->protocol_whitelist, s->protocol_blacklist, NULL) < 0) {
+                           &s->interrupt_callback, &opts, s->protocol_whitelist, s->protocol_blacklist, NULL) < 0) {
                 err = AVERROR_INVALIDDATA;
+                av_dict_free(&opts);
                 goto fail;
             }
+            av_dict_free(&opts);
             break;
         }
         }
-- 
2.17.1



More information about the ffmpeg-devel mailing list