summaryrefslogtreecommitdiff
path: root/libavformat/hls.c
diff options
context:
space:
mode:
authorMicah Galizia <micahgalizia@gmail.com>2015-03-15 09:31:59 +1100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-16 01:57:01 +0100
commit7859618affe574c9de7f240d2ddc016f917c37bd (patch)
treeb4815186d71ca10c759a96364d984f5e64087658 /libavformat/hls.c
parente802abd6e3090de9c638b87d4b86a3b7ec5bfe59 (diff)
avformat/hls: store cookies returned in HLS key response
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/hls.c')
-rw-r--r--libavformat/hls.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 5e8e1b2b5b..5ed7a245de 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -944,6 +944,11 @@ static int open_input(HLSContext *c, struct playlist *pls)
av_log(NULL, AV_LOG_ERROR, "Unable to read key file %s\n",
seg->key);
}
+ av_freep(&c->cookies);
+ av_opt_get(uc->priv_data, "cookies", 0, (uint8_t**)&(c->cookies));
+ if (c->cookies && !strlen(c->cookies))
+ av_freep(&c->cookies);
+ av_dict_set(&opts, "cookies", c->cookies, 0);
ffurl_close(uc);
} else {
av_log(NULL, AV_LOG_ERROR, "Unable to open key file %s\n",