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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/75/merge
Michael Niedermayer 11 years ago
parent a630969535
commit 0d96d44c4f
  1. 3
      libavfilter/vf_vidstabdetect.c
  2. 3
      libavfilter/vf_vidstabtransform.c

@ -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) {

Loading…
Cancel
Save