Commit 935f29eaae for ffmpeg

commit 935f29eaae950c082bdf89076c1248d4f7879806
Author: Niklas Haas <git@haasn.dev>
Date:   Sat Jun 27 10:37:45 2026 +0200

    avformat/shared: rename -read_only to -cache_read_only

    And add a deprecated alias for backwards compatibility.

    Sponsored-by: nxtedition AB
    Signed-off-by: Niklas Haas <git@haasn.dev>

diff --git a/doc/protocols.texi b/doc/protocols.texi
index 55e22b1bbe..aaee2292e9 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -1807,7 +1807,7 @@ to 15, i.e. 32KB blocks. If this does not match the value that was specified
 when an existing cache file was created, the previously specified value will
 be used instead.

-@item read_only
+@item cache_read_only
 If true, use the shared cache for reads but don't write any new blocks to it.
 Default is false. Note that even with this option enabled, the cache file will
 be initialized if it does not already exist.
@@ -1849,8 +1849,9 @@ chosen block size. Accepts the usual size suffixes, e.g. @code{10G} for
 limit.

 Once this limit is reached, the protocol switches to read-only mode (see
-@option{read_only}). Already cached data is never evicted, so once this limit
-is reached, no new data will ever be cached until the cache file is deleted.
+@option{cache_read_only}). Already cached data is never evicted, so once this
+limit is reached, no new data will ever be cached until the cache file is
+deleted.

 Note that this option is best-effort only, and may over-write up to N-1
 blocks, where N is the number of concurrent processes using the same cache
diff --git a/libavformat/shared.c b/libavformat/shared.c
index aac76683ab..f6406da791 100644
--- a/libavformat/shared.c
+++ b/libavformat/shared.c
@@ -941,7 +941,8 @@ static const AVOption options[] = {
     { "cache_dir",      "Directory path for shared file cache",             OFFSET(cache_dir),      AV_OPT_TYPE_STRING, {.str = NULL}, .flags = D },
     { "metadata_dir",   "Directory path for shared file cache metadata",    OFFSET(metadata_dir),   AV_OPT_TYPE_STRING, {.str = NULL}, .flags = D },
     { "block_shift",    "Set the base 2 logarithm of the block size",       OFFSET(block_shift),    AV_OPT_TYPE_INT, {.i64 = 15}, 9, 30, .flags = D },
-    { "read_only",      "Don't write data to the cache, only read from it", OFFSET(read_only),      AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, .flags = D },
+    { "cache_read_only","Don't write data to the cache, only read from it", OFFSET(read_only),      AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, .flags = D },
+    { "read_only",      "Deprecated, use cache_read_only",                  OFFSET(read_only),      AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, .flags = D|AV_OPT_FLAG_DEPRECATED },
     { "cache_verify",   "Verify correctness of the cache against the source",   OFFSET(verify),     AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, .flags = D },
     { "cache_timeout",  "Time in us to wait before re-fetching pending blocks", OFFSET(timeout),    AV_OPT_TYPE_INT64, {.i64 = 10000}, 0, INT64_MAX, .flags = D },
     { "ignore_errors",  "Continue even if the inner URL failed",            OFFSET(ignore_errors),  AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, .flags = D },