diff mbox series

[FFmpeg-devel,3/3] fftools/ffmpeg_opt: Use av_err2str

Message ID 20221004144008.89188-3-epirat07@gmail.com
State Accepted
Commit fed841f6f9ca0251358f386411127bb248601349
Headers show
Series [FFmpeg-devel,1/3] fftools/cmdutils: Use av_err2str | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Marvin Scholz Oct. 4, 2022, 2:40 p.m. UTC
This simplifies the code as there is no other place the error buffer
is needed, so the av_err2str helper macro can be used.
---
 fftools/ffmpeg_opt.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 8f57b699f1..272a772283 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;
 }