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

vectronic hello.vectronic at gmail.com
Thu Apr 30 21:35:03 EEST 2020


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)



More information about the ffmpeg-devel mailing list