stream_curl: disable by default on libavformat < 62.15.101

This commit is contained in:
Kacper Michajłow
2026-05-13 15:38:13 +02:00
parent 724b76fe0a
commit 059bc7025b
2 changed files with 9 additions and 1 deletions
+5
View File
@@ -5747,6 +5747,11 @@ TLS/connection diagnostics), set ``--msg-level=curl=trace``.
``--curl-enabled=<yes|no>``
Enable the libcurl-based network backend (default: ``yes``).
Defaults to ``no`` with libavformat < 62.15.101, which has a nested IO
cleanup bug that can cause crashes or memory leaks. The issue happens only
on transfer failures or aborts, can be enabled if you don't mind possible
stability issues.
``--curl-http-version=<auto|1.0|1.1|2|2tls|2-prior-knowledge|3|3only>``
Select the maximum HTTP protocol version libcurl is allowed to negotiate.
If libcurl was built without HTTP/3 support, it will fallback to ``auto``.
+4 -1
View File
@@ -23,6 +23,7 @@
#include <curl/curl.h>
#include <libavformat/avio.h>
#include <libavformat/version.h>
#include <libavutil/avstring.h>
#include <libavutil/error.h>
#include <libavutil/mem.h>
@@ -106,7 +107,9 @@ const struct m_sub_options curl_conf = {
{0}
},
.defaults = &(const struct curl_opts) {
.enabled = true,
// Older lavf has a bug with nested IO cleanup, disable by default.
// <https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23082>
.enabled = LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(62, 15, 101),
.http_version = CURL_HTTP_VERSION_NONE,
.max_redirects = 16,
.max_retries = 5,