mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-04 05:57:49 +02:00
avformat/hls: store cookies returned in HLS key response
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e802abd6e3
commit
7859618aff
@ -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",
|
av_log(NULL, AV_LOG_ERROR, "Unable to read key file %s\n",
|
||||||
seg->key);
|
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);
|
ffurl_close(uc);
|
||||||
} else {
|
} else {
|
||||||
av_log(NULL, AV_LOG_ERROR, "Unable to open key file %s\n",
|
av_log(NULL, AV_LOG_ERROR, "Unable to open key file %s\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user