mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 07:20:45 +00:00
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@khirnov.net>
This commit is contained in:
parent
3eab2c1af1
commit
88635c7f95
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user