Commit ca2e3e47 authored by Zhang Rui's avatar Zhang Rui Committed by Michael Niedermayer

avformat/cache: pass options to the underlying protocol via the url_open2

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 958836f8
...@@ -70,7 +70,7 @@ static int cmp(void *key, const void *node) ...@@ -70,7 +70,7 @@ static int cmp(void *key, const void *node)
return (*(int64_t *) key) - ((const CacheEntry *) node)->logical_pos; return (*(int64_t *) key) - ((const CacheEntry *) node)->logical_pos;
} }
static int cache_open(URLContext *h, const char *arg, int flags) static int cache_open(URLContext *h, const char *arg, int flags, AVDictionary **options)
{ {
char *buffername; char *buffername;
Context *c= h->priv_data; Context *c= h->priv_data;
...@@ -86,7 +86,7 @@ static int cache_open(URLContext *h, const char *arg, int flags) ...@@ -86,7 +86,7 @@ static int cache_open(URLContext *h, const char *arg, int flags)
unlink(buffername); unlink(buffername);
av_freep(&buffername); av_freep(&buffername);
return ffurl_open(&c->inner, arg, flags, &h->interrupt_callback, NULL); return ffurl_open(&c->inner, arg, flags, &h->interrupt_callback, options);
} }
static int add_entry(URLContext *h, const unsigned char *buf, int size) static int add_entry(URLContext *h, const unsigned char *buf, int size)
...@@ -313,7 +313,7 @@ static const AVClass cache_context_class = { ...@@ -313,7 +313,7 @@ static const AVClass cache_context_class = {
URLProtocol ff_cache_protocol = { URLProtocol ff_cache_protocol = {
.name = "cache", .name = "cache",
.url_open = cache_open, .url_open2 = cache_open,
.url_read = cache_read, .url_read = cache_read,
.url_seek = cache_seek, .url_seek = cache_seek,
.url_close = cache_close, .url_close = cache_close,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment