From 1dee0aca7401fc6c01f23ceedaff6533efb0fb28 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Sun, 6 Nov 2011 23:03:45 +0200 Subject: avio: add avio_open2, taking an interrupt callback and options The interrupt callback has to be passed in during opening (setting it after opening isn't enough), since a blocking open couldn't be interrupted otherwise. Options are passed down to procotols and also need to be available during open() in most cases. Signed-off-by: Anton Khirnov --- libavformat/avio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat/avio.c') diff --git a/libavformat/avio.c b/libavformat/avio.c index 330d52cfec..9de435e073 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -73,7 +73,7 @@ static const AVClass *urlcontext_child_class_next(const AVClass *prev) } static const AVOption options[] = {{NULL}}; -static const AVClass urlcontext_class = { +const AVClass ffurl_context_class = { .class_name = "URLContext", .item_name = urlcontext_to_name, .option = options, @@ -135,7 +135,7 @@ static int url_alloc_for_protocol (URLContext **puc, struct URLProtocol *up, err = AVERROR(ENOMEM); goto fail; } - uc->av_class = &urlcontext_class; + uc->av_class = &ffurl_context_class; uc->filename = (char *) &uc[1]; strcpy(uc->filename, filename); uc->prot = up; -- cgit v1.2.3