[FFmpeg-devel] [PATCH 1/1] avformat hls restore options dict when retrying with a new connection

Steven Liu lq at chinaffmpeg.org
Fri May 1 03:43:03 EEST 2020



> 2020年5月1日 上午2:35,vectronic <hello.vectronic at gmail.com> 写道:
> 
> as per avio_open2 semantics after open_url_keepalive has failed, the options dictionary will have been modified and needs restoring before attempting a new connection
> 
> Signed-off-by: vectronic <hello.vectronic at gmail.com>
> ---
> libavformat/hls.c | 4 ++++
> 1 file changed, 4 insertions(+)
> 
> diff --git a/libavformat/hls.c b/libavformat/hls.c
> index fc45719d1c..9800c9bb8d 100644
> --- a/libavformat/hls.c
> +++ b/libavformat/hls.c
> @@ -679,6 +679,10 @@ static int open_url(AVFormatContext *s, AVIOContext **pb, const char *url,
>                 av_log(s, AV_LOG_WARNING,
>                     "keepalive request failed for '%s' with error: '%s' when opening url, retrying with new connection\n",
>                     url, av_err2str(ret));
> +
> +            av_dict_copy(&tmp, opts, 0);
> +            av_dict_copy(&tmp, opts2, 0);
> +
>             ret = s->io_open(s, pb, url, AVIO_FLAG_READ, &tmp);
>         }
>     } else {
> -- 
> 2.24.2 (Apple Git-127)
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".

LGTM

Thanks

Steven Liu





More information about the ffmpeg-devel mailing list