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@khirnov.net>
This commit is contained in:
parent
88635c7f95
commit
fed841f6f9
@ -3716,7 +3716,6 @@ static int open_files(OptionGroupList *l, const char *inout,
|
|||||||
int ffmpeg_parse_options(int argc, char **argv)
|
int ffmpeg_parse_options(int argc, char **argv)
|
||||||
{
|
{
|
||||||
OptionParseContext octx;
|
OptionParseContext octx;
|
||||||
uint8_t error[128];
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
memset(&octx, 0, sizeof(octx));
|
memset(&octx, 0, sizeof(octx));
|
||||||
@ -3767,8 +3766,7 @@ int ffmpeg_parse_options(int argc, char **argv)
|
|||||||
fail:
|
fail:
|
||||||
uninit_parse_context(&octx);
|
uninit_parse_context(&octx);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
av_strerror(ret, error, sizeof(error));
|
av_log(NULL, AV_LOG_FATAL, "%s\n", av_err2str(ret));
|
||||||
av_log(NULL, AV_LOG_FATAL, "%s\n", error);
|
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user