[FFmpeg-cvslog] avformat/hls: store cookies returned in HLS key response
Micah Galizia
git at videolan.org
Sat Mar 28 12:25:46 CET 2015
ffmpeg | branch: release/2.6 | Micah Galizia <micahgalizia at gmail.com> | Sun Mar 15 09:31:59 2015 +1100| [eebd161e761f363348a48aa739298d2805f9d6f6] | committer: Michael Niedermayer
avformat/hls: store cookies returned in HLS key response
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 7859618affe574c9de7f240d2ddc016f917c37bd)
Signed-off-by: Micah Galizia <micahgalizia at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eebd161e761f363348a48aa739298d2805f9d6f6
---
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",
More information about the ffmpeg-cvslog
mailing list