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>
This commit is contained in:
Andreas Rheinhardt 2024-03-03 23:45:07 +01:00
parent b065ffb295
commit edfb4325e7
2 changed files with 4 additions and 6 deletions

View File

@ -895,11 +895,6 @@ do { \
return 0; 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 read_yesno(void)
{ {
int c = getchar(); int c = getchar();

View File

@ -395,7 +395,10 @@ int setup_find_stream_info_opts(AVFormatContext *s,
* *
* @see av_strerror() * @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 * Print the program banner to stderr. The banner contents depend on the