From: Marvin Scholz <epirat07@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Marvin Scholz <epirat07@gmail.com>
Subject: [FFmpeg-devel] [PATCH 2/3] fftools/ffprobe: Use av_err2str
Date: Tue, 4 Oct 2022 16:40:07 +0200
Message-ID: <20221004144008.89188-2-epirat07@gmail.com> (raw)
In-Reply-To: <20221004144008.89188-1-epirat07@gmail.com>
av_err2str which is a wrapper for av_strerror already calls
strerror_r if available and if not has a fallback for the other
error codes that would be handled by that, so manually calling
strerror again if it fails is not necessary.
---
fftools/ffprobe.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 421ada5bd8..9b7e82fd8c 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -3279,15 +3279,9 @@ static int show_format(WriterContext *w, InputFile *ifile)
static void show_error(WriterContext *w, int err)
{
- char errbuf[128];
- const char *errbuf_ptr = errbuf;
-
- if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)
- errbuf_ptr = strerror(AVUNERROR(err));
-
writer_print_section_header(w, SECTION_ID_ERROR);
print_int("code", err);
- print_str("string", errbuf_ptr);
+ print_str("string", av_err2str(err));
writer_print_section_footer(w);
}
--
2.37.0 (Apple Git-136)
_______________________________________________
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".
next prev parent reply other threads:[~2022-10-04 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 14:40 [FFmpeg-devel] [PATCH 1/3] fftools/cmdutils: " Marvin Scholz
2022-10-04 14:40 ` Marvin Scholz [this message]
2022-10-04 14:40 ` [FFmpeg-devel] [PATCH 3/3] fftools/ffmpeg_opt: " Marvin Scholz
2022-10-13 14:50 ` [FFmpeg-devel] [PATCH 1/3] fftools/cmdutils: " Anton Khirnov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221004144008.89188-2-epirat07@gmail.com \
--to=epirat07@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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