[FFmpeg-cvslog] avformat/rtsp: support buffer_size and pkt_size options for RTP
Jiangjie Gao
git at videolan.org
Sat Mar 20 00:19:36 EET 2021
ffmpeg | branch: master | Jiangjie Gao <gaojiangjie at live.com> | Tue Mar 9 14:21:19 2021 +0800| [3e9284fccbfbea0a6feea5dae49725ced08953e2] | committer: Marton Balint
avformat/rtsp: support buffer_size and pkt_size options for RTP
And forward it to the underlying UDP protocol.
Fixes ticket #7517.
Signed-off-by: Jiangjie Gao <gaojiangjie at live.com>
Signed-off-by: Marton Balint <cus at passwd.hu>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3e9284fccbfbea0a6feea5dae49725ced08953e2
---
doc/protocols.texi | 3 +++
libavformat/rtsp.c | 5 ++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/doc/protocols.texi b/doc/protocols.texi
index 78afe6ec8e..d3f6cbefcf 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -1033,6 +1033,9 @@ Set the local RTCP port to @var{n}.
@item pkt_size=@var{n}
Set max packet size (in bytes) to @var{n}.
+ at item buffer_size=@var{size}
+Set the maximum UDP socket buffer size in bytes.
+
@item connect=0|1
Do a @code{connect()} on the UDP socket (if set to 1) or not (if set
to 0).
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 9a2933346e..25bdf475b3 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -2506,12 +2506,15 @@ static int rtp_read_header(AVFormatContext *s)
RTSPState *rt = s->priv_data;
const char *p;
AVBPrint sdp;
+ AVDictionary *opts = NULL;
if (!ff_network_init())
return AVERROR(EIO);
+ opts = map_to_opts(rt);
ret = ffurl_open_whitelist(&in, s->url, AVIO_FLAG_READ,
- &s->interrupt_callback, NULL, s->protocol_whitelist, s->protocol_blacklist, NULL);
+ &s->interrupt_callback, &opts, s->protocol_whitelist, s->protocol_blacklist, NULL);
+ av_dict_free(&opts);
if (ret)
goto fail;
More information about the ffmpeg-cvslog
mailing list