PR #25065 opened by Niklas Haas (haasn) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25065 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25065.patch
And add a deprecated alias for backwards compatibility. Sponsored-by: nxtedition AB Signed-off-by: Niklas Haas <[email protected]> # Summary of changes Briefly describe what this PR does and why. <!-- If this PR requires new FATE test samples, attach them to the PR and list their target paths below (relative to the fate-suite root). Attached filenames must match the sample's filename: ```fate-samples # e.g. vorbis/new-sample.ogg ``` --> >From b5a56b0d183078a60d95f8e5a4bc3c90e81653b1 Mon Sep 17 00:00:00 2001 From: Niklas Haas <[email protected]> Date: Sat, 27 Jun 2026 10:37:45 +0200 Subject: [PATCH] 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 <[email protected]> --- doc/protocols.texi | 2 +- libavformat/shared.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/protocols.texi b/doc/protocols.texi index 7812d154db..1cf5b13d14 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -1800,7 +1800,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. 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 }, -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
