diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2015-03-22 21:16:55 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-04-01 14:26:35 +0200 |
commit | e3ec6fe7bb2a622a863e3912181717a659eb1bad (patch) | |
tree | b2ef268be39636d5b581437eb231fe4e27b6154b /libavformat/rtspdec.c | |
parent | 8c9c5479c4ba729b4ba868ab541a90b2061a7c2f (diff) | |
download | ffmpeg-e3ec6fe7bb2a622a863e3912181717a659eb1bad.tar.gz |
rtsp: Add a buffer_size option
And forward it to rtp and udp.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavformat/rtspdec.c')
-rw-r--r-- | libavformat/rtspdec.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); |