Hi, Backport code to store cookies stored by HLS key.
-- "The mark of an immature man is that he wants to die nobly for a cause, while the mark of the mature man is that he wants to live humbly for one." --W. Stekel
From faf8f1c6c1efb87caf50fd054809769b1c5040f2 Mon Sep 17 00:00:00 2001 From: Micah Galizia <micahgali...@gmail.com> Date: Sun, 15 Mar 2015 09:31:59 +1100 Subject: [PATCH 1/3] avformat/hls: store cookies returned in HLS key response Signed-off-by: Michael Niedermayer <michae...@gmx.at> (cherry picked from commit 7859618affe574c9de7f240d2ddc016f917c37bd) Signed-off-by: Micah Galizia <micahgali...@gmail.com> --- libavformat/hls.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/hls.c b/libavformat/hls.c index 5e8e1b2..5ed7a24 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", -- 2.1.0
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel