From e3ec6fe7bb2a622a863e3912181717a659eb1bad Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Sun, 22 Mar 2015 21:16:55 +0100 Subject: rtsp: Add a buffer_size option And forward it to rtp and udp. Signed-off-by: Luca Barbato --- libavformat/rtspdec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libavformat/rtspdec.c') diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 659c768423..bb9c67473a 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -287,10 +287,15 @@ static int rtsp_read_setup(AVFormatContext *s, char* host, char *controlurl) request.transports[0].interleaved_max); } else { do { + AVDictionary *opts = NULL; + char buf[256]; + snprintf(buf, sizeof(buf), "%d", rt->buffer_size); + av_dict_set(&opts, "buffer_size", buf, 0); ff_url_join(url, sizeof(url), "rtp", NULL, host, localport, NULL); av_dlog(s, "Opening: %s", url); ret = ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE, - &s->interrupt_callback, NULL); + &s->interrupt_callback, &opts); + av_dict_free(&opts); if (ret) localport += 2; } while (ret || localport > rt->rtp_port_max); -- cgit v1.2.3