diff options
author | wm4 <wm4@nowhere> | 2013-12-22 13:11:22 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-22 13:11:22 +0100 |
commit | 3a637d411f603fd82ee0bf8a181ea20d60e7c88f (patch) | |
tree | c6b8d073151f0952ddb3aa804eaec6546d49cf44 /stream/cookies.c | |
parent | 38be9d5fed172ab8ee24c8c2cb0c94fb41d02e37 (diff) | |
download | mpv-3a637d411f603fd82ee0bf8a181ea20d60e7c88f.tar.bz2 mpv-3a637d411f603fd82ee0bf8a181ea20d60e7c88f.tar.xz |
options: move network related options to MPOpts
Diffstat (limited to 'stream/cookies.c')
-rw-r--r-- | stream/cookies.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/stream/cookies.c b/stream/cookies.c index f29db88b57..50f515f911 100644 --- a/stream/cookies.c +++ b/stream/cookies.c @@ -39,8 +39,6 @@ #define MAX_COOKIES 20 -char *cookies_file = NULL; - typedef struct cookie_list_type { char *name; char *value; @@ -173,13 +171,13 @@ static struct cookie_list_type *load_cookies_from(struct mp_log *log, // Return a cookies string as expected by lavf (libavformat/http.c). The format // is like a Set-Cookie header (http://curl.haxx.se/rfc/cookie_spec.html), // separated by newlines. -char *cookies_lavf(struct mp_log *log) +char *cookies_lavf(void *talloc_ctx, struct mp_log *log, char *file) { - if (!cookie_list && cookies_file) - cookie_list = load_cookies_from(log, cookies_file, NULL); + if (!cookie_list && file && file[0]) + cookie_list = load_cookies_from(log, file, NULL); struct cookie_list_type *list = cookie_list; - char *res = talloc_strdup(NULL, ""); + char *res = talloc_strdup(talloc_ctx, ""); while (list) { res = talloc_asprintf_append_buffer(res, |