summaryrefslogtreecommitdiffstats
path: root/libavformat/hls.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/hls.c')
-rw-r--r--libavformat/hls.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c
index aa5d60e..1715445 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -614,7 +614,8 @@ 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->opaque;
+ AVIOInternal *internal = (s->flags & AVFMT_FLAG_CUSTOM_IO) ? NULL : s->pb->opaque;
+ void *u = internal ? internal->hlsopts : NULL;
update_options(&c->cookies, "cookies", u);
av_dict_set(&opts, "cookies", c->cookies, 0);
}
@@ -1496,7 +1497,8 @@ static int nested_io_open(AVFormatContext *s, AVIOContext **pb, const char *url,
static int hls_read_header(AVFormatContext *s)
{
- void *u = (s->flags & AVFMT_FLAG_CUSTOM_IO) ? NULL : s->pb->opaque;
+ AVIOInternal *internal = (s->flags & AVFMT_FLAG_CUSTOM_IO) ? NULL : s->pb->opaque;
+ void *u = internal ? internal->hlsopts : NULL;
HLSContext *c = s->priv_data;
int ret = 0, i, j, stream_offset = 0;
OpenPOWER on IntegriCloud