diff options
author | Stephan Holljes <klaxa1337@googlemail.com> | 2015-07-03 02:24:18 +0200 |
---|---|---|
committer | Stephan Holljes <klaxa1337@googlemail.com> | 2015-08-01 00:58:31 +0200 |
commit | 5125e4b53f71ca3c7d34c5812425f6f2fb963375 (patch) | |
tree | 7392ae20b74db1bc86323f2847a897fb142ed2e8 /libavformat/avio.c | |
parent | cf6c871beec9039dc6d7ebda57358161d64062c3 (diff) | |
download | ffmpeg-5125e4b53f71ca3c7d34c5812425f6f2fb963375.tar.gz |
lavf/avio: add ffurl_accept and ffurl_handshake
Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r-- | libavformat/avio.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c index c188adcce1..21713d9d5e 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -211,6 +211,26 @@ int ffurl_connect(URLContext *uc, AVDictionary **options) return 0; } +int ffurl_accept(URLContext *s, URLContext **c) +{ + av_assert0(!*c); + if (s->prot->url_accept) + return s->prot->url_accept(s, c); + return AVERROR(EBADF); +} + +int ffurl_handshake(URLContext *c) +{ + int ret; + if (c->prot->url_handshake) { + ret = c->prot->url_handshake(c); + if (ret) + return ret; + } + c->is_connected = 1; + return 0; +} + #define URL_SCHEME_CHARS \ "abcdefghijklmnopqrstuvwxyz" \ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ |