This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit a7c5ac872723dc5725fc3e8b4f3c9596238ecb5a Author: Felipe Araújo <[email protected]> AuthorDate: Sat Oct 10 03:16:03 2026 -0300 Commit: michaelni <[email protected]> CommitDate: Sun Oct 11 23:10:44 2026 +0000 avformat/file: replace misleading url_check on pipe and fd protocols file_check treats the URL as a file path, so for the pipe and fd protocols its result depends on whether a file with that name happens to exist. A real check is not possible, since the descriptor comes from an option and avio_check does not pass options. Fully removing the check would make avio_check open the descriptor instead, which for seekable output rewinds it. So report the check as explicitly unsupported. Signed-off-by: Felipe Araújo <[email protected]> --- libavformat/file.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/libavformat/file.c b/libavformat/file.c index 71d30a25c4..fb344aef93 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -223,6 +223,15 @@ static int fd_dup(URLContext *h, int oldfd) } #endif +#if CONFIG_FD_PROTOCOL || CONFIG_PIPE_PROTOCOL +/* Without a check, avio_check() would open the descriptor, rewinding seekable + * output. It cannot pass the option selecting the descriptor, so just fail. */ +static int fd_check(URLContext *h, int mask) +{ + return AVERROR(ENOSYS); +} +#endif + static int file_close(URLContext *h) { FileContext *c = h->priv_data; @@ -481,7 +490,7 @@ const URLProtocol ff_pipe_protocol = { .url_write = file_write, .url_close = file_close, .url_get_file_handle = file_get_handle, - .url_check = file_check, + .url_check = fd_check, .priv_data_size = sizeof(FileContext), .priv_data_class = &pipe_class, .default_whitelist = "crypto,data" @@ -527,7 +536,7 @@ const URLProtocol ff_fd_protocol = { .url_seek = file_seek, .url_close = file_close, .url_get_file_handle = file_get_handle, - .url_check = file_check, + .url_check = fd_check, .priv_data_size = sizeof(FileContext), .priv_data_class = &fd_class, .default_whitelist = "crypto,data" @@ -687,7 +696,6 @@ const URLProtocol ff_android_content_protocol = { .url_seek = file_seek, .url_close = file_close, .url_get_file_handle = file_get_handle, - .url_check = NULL, .priv_data_size = sizeof(FileContext), .priv_data_class = &android_content_class, }; -- 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]
