[FFmpeg-cvslog] fftools/ffprobe: Use av_err2str
Marvin Scholz
git at videolan.org
Fri Oct 14 13:21:31 EEST 2022
ffmpeg | branch: master | Marvin Scholz <epirat07 at gmail.com> | Tue Oct 4 16:40:07 2022 +0200| [88635c7f953ebae9e1beced0e4ecb5f026f47dde] | committer: Anton Khirnov
fftools/ffprobe: Use av_err2str
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.
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=88635c7f953ebae9e1beced0e4ecb5f026f47dde
---
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);
}
More information about the ffmpeg-cvslog
mailing list