#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
-#include "libavutil/file.h"
+#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "libavutil/tree.h"
#include "avformat.h"
av_strstart(arg, "cache:", &arg);
- c->fd = av_tempfile("ffcache", &buffername, 0, h);
+ c->fd = avpriv_tempfile("ffcache", &buffername, 0, h);
if (c->fd < 0){
av_log(h, AV_LOG_ERROR, "Failed to create tempfile\n");
return c->fd;
av_freep(&buffername);
return ffurl_open_whitelist(&c->inner, arg, flags, &h->interrupt_callback,
- options, h->protocol_whitelist);
+ options, h->protocol_whitelist, h->protocol_blacklist);
}
static int add_entry(URLContext *h, const unsigned char *buf, int size)
return ret;
}
+static int enu_free(void *opaque, void *elem)
+{
+ av_free(elem);
+ return 0;
+}
+
static int cache_close(URLContext *h)
{
Context *c= h->priv_data;
close(c->fd);
ffurl_close(c->inner);
+ av_tree_enumerate(c->root, NULL, NULL, enu_free);
av_tree_destroy(c->root);
return 0;