From 63c07a956bb240ebd5aeb0509953fe80e08e4699 Mon Sep 17 00:00:00 2001 From: Stephan Holljes Date: Fri, 3 Jul 2015 02:25:51 +0200 Subject: lavf/avio: add avio_accept and avio_handshake Signed-off-by: Stephan Holljes --- libavformat/aviobuf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'libavformat/aviobuf.c') diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index aceb3bf..1b3d5f5 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -1021,6 +1021,23 @@ int avio_read_to_bprint(AVIOContext *h, AVBPrint *pb, size_t max_size) return 0; } +int avio_accept(AVIOContext *s, AVIOContext **c) +{ + int ret; + URLContext *sc = s->opaque; + URLContext *cc = NULL; + ret = ffurl_accept(sc, &cc); + if (ret < 0) + return ret; + return ffio_fdopen(c, cc); +} + +int avio_handshake(AVIOContext *c) +{ + URLContext *cc = c->opaque; + return ffurl_handshake(cc); +} + /* output in a dynamic buffer */ typedef struct DynBuffer { -- cgit v1.1