[FFmpeg-cvslog] fftools/ffmpeg_opt: Use av_err2str
Marvin Scholz
git at videolan.org
Fri Oct 14 13:21:34 EEST 2022
ffmpeg | branch: master | Marvin Scholz <epirat07 at gmail.com> | Tue Oct 4 16:40:08 2022 +0200| [fed841f6f9ca0251358f386411127bb248601349] | committer: Anton Khirnov
fftools/ffmpeg_opt: Use av_err2str
This simplifies the code as there is no other place the error buffer
is needed, so the av_err2str helper macro can be used.
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fed841f6f9ca0251358f386411127bb248601349
---
fftools/ffmpeg_opt.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index c1de4e5041..fbc8638eed 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -3716,7 +3716,6 @@ static int open_files(OptionGroupList *l, const char *inout,
int ffmpeg_parse_options(int argc, char **argv)
{
OptionParseContext octx;
- uint8_t error[128];
int ret;
memset(&octx, 0, sizeof(octx));
@@ -3767,8 +3766,7 @@ int ffmpeg_parse_options(int argc, char **argv)
fail:
uninit_parse_context(&octx);
if (ret < 0) {
- av_strerror(ret, error, sizeof(error));
- av_log(NULL, AV_LOG_FATAL, "%s\n", error);
+ av_log(NULL, AV_LOG_FATAL, "%s\n", av_err2str(ret));
}
return ret;
}
More information about the ffmpeg-cvslog
mailing list