mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-06 17:29:08 +08:00
fftools/cmdutils: 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:

committed by
Anton Khirnov

parent
25e1986e68
commit
3eab2c1af1
@@ -798,12 +798,7 @@ do { \
|
|||||||
|
|
||||||
void print_error(const char *filename, int err)
|
void print_error(const char *filename, int err)
|
||||||
{
|
{
|
||||||
char errbuf[128];
|
av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, av_err2str(err));
|
||||||
const char *errbuf_ptr = errbuf;
|
|
||||||
|
|
||||||
if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)
|
|
||||||
errbuf_ptr = strerror(AVUNERROR(err));
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, errbuf_ptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int read_yesno(void)
|
int read_yesno(void)
|
||||||
|
Reference in New Issue
Block a user