diff options
author | Stephan Holljes <klaxa1337@googlemail.com> | 2015-07-03 02:25:51 +0200 |
---|---|---|
committer | Stephan Holljes <klaxa1337@googlemail.com> | 2015-08-01 00:58:31 +0200 |
commit | 63c07a956bb240ebd5aeb0509953fe80e08e4699 (patch) | |
tree | 3c13d2e5e58406dd5104b283eaa850295a8e2240 /libavformat/aviobuf.c | |
parent | 5125e4b53f71ca3c7d34c5812425f6f2fb963375 (diff) | |
download | ffmpeg-63c07a956bb240ebd5aeb0509953fe80e08e4699.tar.gz |
lavf/avio: add avio_accept and avio_handshake
Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r-- | libavformat/aviobuf.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index aceb3bfcb7..1b3d5f5b80 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 { |