The branch, master has been updated
via 91512f08567eefd31e80e8bc70ca6d014a5fbaa5 (commit)
from 5b388f28384a76acf6e83ba4418863d9a7a2cad2 (commit)
- Log -----------------------------------------------------------------
commit 91512f08567eefd31e80e8bc70ca6d014a5fbaa5
Author: caifan3 <[email protected]>
AuthorDate: Wed Oct 15 19:03:21 2025 +0800
Commit: Zhao Zhili <[email protected]>
CommitDate: Tue Oct 28 02:48:05 2025 +0000
fftools/cmdutils: Rename file_read to read_file_to_string to avoid symbol
collision with NuttX
The function name 'file_read' is too generic and conflicts with a function
of the same name in the NuttX kernel. Since NuttX links kernel and userspace
into a single binary, this causes a symbol collision when building FFmpeg
tools.
Signed-off-by: caifan3 <[email protected]>
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index dc093b0bd3..5f79d269b2 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -263,7 +263,7 @@ static int write_option(void *optctx, const OptionDef *po,
const char *opt,
return AVERROR(EINVAL);
}
- arg_allocated = file_read(arg);
+ arg_allocated = read_file_to_string(arg);
if (!arg_allocated) {
av_log(NULL, AV_LOG_FATAL,
"Error reading the value for option '%s' from file: %s\n",
@@ -1498,7 +1498,7 @@ double get_rotation(const int32_t *displaymatrix)
}
/* read file contents into a string */
-char *file_read(const char *filename)
+char *read_file_to_string(const char *filename)
{
AVIOContext *pb = NULL;
int ret = avio_open(&pb, filename, AVIO_FLAG_READ);
diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h
index ad020f893a..c4a3efcf52 100644
--- a/fftools/cmdutils.h
+++ b/fftools/cmdutils.h
@@ -535,7 +535,7 @@ void *allocate_array_elem(void *array, size_t elem_size,
int *nb_elems);
double get_rotation(const int32_t *displaymatrix);
/* read file contents into a string */
-char *file_read(const char *filename);
+char *read_file_to_string(const char *filename);
/* Remove keys in dictionary b from dictionary a */
void remove_avoptions(AVDictionary **a, AVDictionary *b);
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index c1c8eeb2d8..b9a51ad687 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -507,7 +507,7 @@ static int filter_opt_apply(void *logctx, AVFilterContext
*f,
ret = av_opt_set_bin(f, key, data, len, AV_OPT_SEARCH_CHILDREN);
av_freep(&data);
} else {
- char *data = file_read(val);
+ char *data = read_file_to_string(val);
if (!data) {
ret = AVERROR(EIO);
goto err_load;
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
index e6c10edd62..c24b69f2d1 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -453,7 +453,7 @@ static int ost_get_filters(const OptionsContext *o,
AVFormatContext *oc,
}
if (filters_script)
- *dst = file_read(filters_script);
+ *dst = read_file_to_string(filters_script);
else
#endif
if (filters)
@@ -732,7 +732,7 @@ static int new_stream_video(Muxer *mux, const
OptionsContext *o,
AV_OPT_SEARCH_CHILDREN);
} else {
if (video_enc->flags & AV_CODEC_FLAG_PASS2) {
- char *logbuffer = file_read(logfilename);
+ char *logbuffer = read_file_to_string(logfilename);
if (!logbuffer) {
av_log(ost, AV_LOG_FATAL, "Error reading log file '%s'
for pass-2 encoding\n",
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index e2fdfaa821..4152bbf06f 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1189,7 +1189,7 @@ static int opt_filter_complex_script(void *optctx, const
char *opt, const char *
char *graph_desc;
int ret;
- graph_desc = file_read(arg);
+ graph_desc = read_file_to_string(arg);
if (!graph_desc)
return AVERROR(EINVAL);
-----------------------------------------------------------------------
Summary of changes:
fftools/cmdutils.c | 4 ++--
fftools/cmdutils.h | 2 +-
fftools/ffmpeg_filter.c | 2 +-
fftools/ffmpeg_mux_init.c | 4 ++--
fftools/ffmpeg_opt.c | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]