Signed-off-by: Micah Galizia <micahgali...@gmail.com> --- libavformat/hls.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/libavformat/hls.c b/libavformat/hls.c index bac53a4..ab81863 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -630,8 +630,14 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url, ret = s->io_open(s, pb, url, AVIO_FLAG_READ, &tmp); if (ret >= 0) { // update cookies on http response with setcookies. - void *u = (s->flags & AVFMT_FLAG_CUSTOM_IO) ? NULL : s->pb; - update_options(&c->cookies, "cookies", u); + char *new_cookies = NULL; + + av_opt_get(*pb, "cookies", AV_OPT_SEARCH_CHILDREN, (uint8_t**)&new_cookies); + if (new_cookies) { + av_free(c->cookies); + c->cookies = new_cookies; + } + av_dict_set(&opts, "cookies", c->cookies, 0); } -- 2.9.3 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel