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.vectro...@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@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to