This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 9894232a4069e6f3a3cfa67cb6e09552f44fb240 Author: Michael Niedermayer <[email protected]> AuthorDate: Sun Aug 30 19:56:07 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Wed Sep 16 18:58:15 2026 +0000 avformat/avio: record on the URLContext whether it uses the network A URLContext learns from its protocol's URL_PROTOCOL_FLAG_NETWORK whether it uses the network, and a nested protocol passes the property up to the wrapper that opened it. Wrappers like cache, crypto, async, subfile and concat thus report the network use of what they wrap, so callers that only see the outer context can act on it. --- libavformat/avio.c | 6 +++++- libavformat/url.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index 22b4948481..4c06199346 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -152,6 +152,7 @@ static int url_alloc_for_protocol(URLContext **puc, const URLProtocol *up, uc->prot = up; uc->flags = flags; uc->is_streamed = 0; /* default = not streamed */ + uc->uses_network = !!(up->flags & URL_PROTOCOL_FLAG_NETWORK); uc->max_packet_size = 0; /* default: stream file */ if (up->priv_data_size) { uc->priv_data = av_mallocz(up->priv_data_size); @@ -451,8 +452,11 @@ static int url_open_whitelist(URLContext **puc, const char *filename, int flags, ret = ffurl_connect(*puc, options); - if (!ret) + if (!ret) { + if (parent) + parent->uses_network |= (*puc)->uses_network; return 0; + } fail: ffurl_closep(puc); return ret; diff --git a/libavformat/url.h b/libavformat/url.h index 2c6371e039..1075014333 100644 --- a/libavformat/url.h +++ b/libavformat/url.h @@ -40,6 +40,7 @@ typedef struct URLContext { int flags; int max_packet_size; /**< if non zero, the stream is packetized with this max packet size */ int is_streamed; /**< true if streamed (no seek possible), default = false */ + int uses_network; /**< true if this protocol or one nested in it uses the network */ int is_connected; AVIOInterruptCB interrupt_callback; int64_t rw_timeout; /**< maximum time to wait for (network) read/write operation completion, in mcs */ -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
