[FFmpeg-cvslog] avformat/cache: pass options to the underlying protocol via the url_open2

Zhang Rui git at videolan.org
Sat Jan 31 19:04:36 CET 2015


ffmpeg | branch: master | Zhang Rui <bbcallen at gmail.com> | Sat Jan 31 13:35:04 2015 +0800| [ca2e3e47fc6f755e5614e33dc0e654b8137fc16f] | committer: Michael Niedermayer

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

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ca2e3e47fc6f755e5614e33dc0e654b8137fc16f
---

 libavformat/cache.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/cache.c b/libavformat/cache.c
index 02b02bb..26e68c5 100644
--- a/libavformat/cache.c
+++ b/libavformat/cache.c
@@ -70,7 +70,7 @@ static int cmp(void *key, const void *node)
     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;
     Context *c= h->priv_data;
@@ -86,7 +86,7 @@ static int cache_open(URLContext *h, const char *arg, int flags)
     unlink(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)
@@ -313,7 +313,7 @@ static const AVClass cache_context_class = {
 
 URLProtocol ff_cache_protocol = {
     .name                = "cache",
-    .url_open            = cache_open,
+    .url_open2           = cache_open,
     .url_read            = cache_read,
     .url_seek            = cache_seek,
     .url_close           = cache_close,



More information about the ffmpeg-cvslog mailing list