mirror of https://git.ffmpeg.org/ffmpeg.git
lavfi/vf_signature: use av_err2str to simplify code
No need to explicitly specify the buffer here as it is only ever passed to av_log, so av_err2str can be used.
This commit is contained in:
parent
8fac5beaf8
commit
e7126d9648
|
@ -386,9 +386,7 @@ static int xml_export(AVFilterContext *ctx, StreamContext *sc, const char* filen
|
||||||
f = avpriv_fopen_utf8(filename, "w");
|
f = avpriv_fopen_utf8(filename, "w");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
int err = AVERROR(EINVAL);
|
int err = AVERROR(EINVAL);
|
||||||
char buf[128];
|
av_log(ctx, AV_LOG_ERROR, "cannot open xml file %s: %s\n", filename, av_err2str(err));
|
||||||
av_strerror(err, buf, sizeof(buf));
|
|
||||||
av_log(ctx, AV_LOG_ERROR, "cannot open xml file %s: %s\n", filename, buf);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -500,9 +498,7 @@ static int binary_export(AVFilterContext *ctx, StreamContext *sc, const char* fi
|
||||||
f = avpriv_fopen_utf8(filename, "wb");
|
f = avpriv_fopen_utf8(filename, "wb");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
int err = AVERROR(EINVAL);
|
int err = AVERROR(EINVAL);
|
||||||
char buf[128];
|
av_log(ctx, AV_LOG_ERROR, "cannot open file %s: %s\n", filename, av_err2str(err));
|
||||||
av_strerror(err, buf, sizeof(buf));
|
|
||||||
av_log(ctx, AV_LOG_ERROR, "cannot open file %s: %s\n", filename, buf);
|
|
||||||
av_freep(&buffer);
|
av_freep(&buffer);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue