* [FFmpeg-devel] [PATCH] fftools/cmdutils: Inline print_error()
@ 2024-03-03 22:46 Andreas Rheinhardt
2024-03-04 10:42 ` Stefano Sabatini
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Rheinhardt @ 2024-03-03 22:46 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
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 --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
--
2.40.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH] fftools/cmdutils: Inline print_error()
2024-03-03 22:46 [FFmpeg-devel] [PATCH] fftools/cmdutils: Inline print_error() Andreas Rheinhardt
@ 2024-03-04 10:42 ` Stefano Sabatini
0 siblings, 0 replies; 2+ messages in thread
From: Stefano Sabatini @ 2024-03-04 10:42 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Andreas Rheinhardt
On date Sunday 2024-03-03 23:46:24 +0100, Andreas Rheinhardt wrote:
> 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(-)
LGTM, thanks.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-04 10:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-03 22:46 [FFmpeg-devel] [PATCH] fftools/cmdutils: Inline print_error() Andreas Rheinhardt
2024-03-04 10:42 ` Stefano Sabatini
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git