[FFmpeg-devel] [PATCH] Update Cookies on Setcookie playlist response

wm4 nfxjfg at googlemail.com
Tue Sep 22 09:39:33 CEST 2015


On Tue, 22 Sep 2015 04:37:48 +0000
Lucas Andrade <lucas at mindello.com.br> wrote:

> This fixes the https://trac.ffmpeg.org/ticket/4808, as it sets the cookie
> on playlist response with setcookie header.
> 
> Update Cookies on Setcookie playlist response
> ---
>  libavformat/hls.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavformat/hls.c b/libavformat/hls.c
> index 82dd744..e5c84e1 100644
> --- a/libavformat/hls.c
> +++ b/libavformat/hls.c
> @@ -996,6 +996,8 @@ static int open_input(HLSContext *c, struct playlist
> *pls)
> 
>      if (seg->key_type == KEY_NONE) {
>          ret = open_url(pls->parent->priv_data, &pls->input, seg->url,
> opts);
> +        update_options(&c->cookies, "cookies", pls->input->priv_data);
> +        av_dict_set(&opts, "cookies", c->cookies, 0);
>      } else if (seg->key_type == KEY_AES_128) {
>  //         HLSContext *c = var->parent->priv_data;
>          char iv[33], key[33], url[MAX_URL_SIZE];

This doesn't do the same for the other code paths.


More information about the ffmpeg-devel mailing list