diff options
author | Martin Storsjö <martin@martin.st> | 2015-02-28 02:00:50 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2016-03-24 10:34:19 +0200 |
commit | fab8156b2f30666adabe227b3d7712fd193873b1 (patch) | |
tree | 025734e80fdf8862c1769bb039d1d895e1bf82c8 /libavformat/rtsp.c | |
parent | 564b4591bbe223bdc5f36a1131eaef103f23f5d0 (diff) | |
download | ffmpeg-fab8156b2f30666adabe227b3d7712fd193873b1.tar.gz |
avio: Copy URLContext generic options into child URLContexts
Since all URLContexts have the same AVOptions, such AVOptions
will be applied on the outermost context only and removed from the
dict, while they probably make sense on all contexts.
This makes sure that rw_timeout gets propagated to the innermost
URLContext (to make sure it gets passed to the tcp protocol, when
opening a http connection for instance).
Alternatively, such matching options would be kept in the dict
and only removed after the ffurl_connect call.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index dc07422349..7e430e838b 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1466,7 +1466,7 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, /* we will use two ports per rtp stream (rtp and rtcp) */ j += 2; err = ffurl_open(&rtsp_st->rtp_handle, buf, AVIO_FLAG_READ_WRITE, - &s->interrupt_callback, &opts, rt->protocols); + &s->interrupt_callback, &opts, rt->protocols, NULL); av_dict_free(&opts); @@ -1610,7 +1610,7 @@ 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(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE, - &s->interrupt_callback, NULL, rt->protocols) < 0) { + &s->interrupt_callback, NULL, rt->protocols, NULL) < 0) { err = AVERROR_INVALIDDATA; goto fail; } @@ -1804,7 +1804,7 @@ redirect: ff_url_join(tcpname, sizeof(tcpname), lower_rtsp_proto, NULL, host, port, NULL); if (ffurl_open(&rt->rtsp_hd, tcpname, AVIO_FLAG_READ_WRITE, - &s->interrupt_callback, NULL, rt->protocols) < 0) { + &s->interrupt_callback, NULL, rt->protocols, NULL) < 0) { err = AVERROR(EIO); goto fail; } @@ -2311,7 +2311,7 @@ static int sdp_read_header(AVFormatContext *s) rtsp_st->nb_exclude_source_addrs, rtsp_st->exclude_source_addrs); err = ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE, - &s->interrupt_callback, &opts, rt->protocols); + &s->interrupt_callback, &opts, rt->protocols, NULL); av_dict_free(&opts); @@ -2388,7 +2388,7 @@ static int rtp_read_header(AVFormatContext *s) } ret = ffurl_open(&in, s->filename, AVIO_FLAG_READ, - &s->interrupt_callback, NULL, rt->protocols); + &s->interrupt_callback, NULL, rt->protocols, NULL); if (ret) goto fail; |