Commit 0d96d44c authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter: Read errno before av_log() as the callback from av_log() might affect errno

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a6309695
......@@ -176,8 +176,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
return AVERROR(AVERROR_EXTERNAL);
} else {
if (vsWriteToFile(md, sd->f, &localmotions) != VS_OK) {
int ret = AVERROR(errno);
av_log(ctx, AV_LOG_ERROR, "cannot write to transform file");
return AVERROR(errno);
return ret;
}
vs_vector_del(&localmotions);
}
......
......@@ -208,8 +208,9 @@ static int config_input(AVFilterLink *inlink)
f = fopen(tc->input, "r");
if (!f) {
int ret = AVERROR(errno);
av_log(ctx, AV_LOG_ERROR, "cannot open input file %s\n", tc->input);
return AVERROR(errno);
return ret;
} else {
VSManyLocalMotions mlms;
if (vsReadLocalMotionsFile(f, &mlms) == VS_OK) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment