diff mbox series

[FFmpeg-devel] fftools/cmdutils: Inline print_error()

Message ID DU0P250MB0747B36A250B820CD4DFC2628F5C2@DU0P250MB0747.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit edfb4325e77e9b755ac72c448a9aff2adfbcffb6
Headers show
Series [FFmpeg-devel] fftools/cmdutils: Inline print_error() | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt March 3, 2024, 10:46 p.m. UTC
It is only used by ffprobe (once) and ffplay (twice);
inlining it avoids including it unnecessarily into ffmpeg.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 fftools/cmdutils.c | 5 -----
 fftools/cmdutils.h | 5 ++++-
 2 files changed, 4 insertions(+), 6 deletions(-)
diff mbox series

Patch

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