aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-03 23:45:07 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-04 12:07:58 +0100
commitedfb4325e77e9b755ac72c448a9aff2adfbcffb6 (patch)
tree1d60add6ce00d3a10d1b44d36214c83aec365367
parentb065ffb295ac21f1832c17339f17f7052b7c2bb0 (diff)
downloadffmpeg-edfb4325e77e9b755ac72c448a9aff2adfbcffb6.tar.gz
fftools/cmdutils: Inline print_error()
It is only used by ffprobe (once) and ffplay (twice); inlining it avoids including it unnecessarily into ffmpeg. Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--fftools/cmdutils.c5
-rw-r--r--fftools/cmdutils.h5
2 files changed, 4 insertions, 6 deletions
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 3d613a4018..008949a39d 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -895,11 +895,6 @@ do { \
return 0;
}
-void print_error(const char *filename, int err)
-{
- av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, av_err2str(err));
-}
-
int read_yesno(void)
{
int c = getchar();
diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h
index 69e253c6ef..86428b3fa4 100644
--- a/fftools/cmdutils.h
+++ b/fftools/cmdutils.h
@@ -395,7 +395,10 @@ int setup_find_stream_info_opts(AVFormatContext *s,
*
* @see av_strerror()
*/
-void print_error(const char *filename, int err);
+static inline void print_error(const char *filename, int err)
+{
+ av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, av_err2str(err));
+}
/**
* Print the program banner to stderr. The banner contents depend on the