summaryrefslogtreecommitdiff
path: root/libavformat/avio.c
diff options
context:
space:
mode:
authorStephan Holljes <klaxa1337@googlemail.com>2015-07-03 02:24:18 +0200
committerStephan Holljes <klaxa1337@googlemail.com>2015-08-01 00:58:31 +0200
commit5125e4b53f71ca3c7d34c5812425f6f2fb963375 (patch)
tree7392ae20b74db1bc86323f2847a897fb142ed2e8 /libavformat/avio.c
parentcf6c871beec9039dc6d7ebda57358161d64062c3 (diff)
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.c20
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" \