From 0d96d44c4fa526582500718254ac9e19f984c6a5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 25 Oct 2014 13:19:41 +0200 Subject: avfilter: Read errno before av_log() as the callback from av_log() might affect errno Signed-off-by: Michael Niedermayer --- libavfilter/vf_vidstabdetect.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavfilter/vf_vidstabdetect.c') diff --git a/libavfilter/vf_vidstabdetect.c b/libavfilter/vf_vidstabdetect.c index bf067afaf9..1df6f74f4e 100644 --- a/libavfilter/vf_vidstabdetect.c +++ b/libavfilter/vf_vidstabdetect.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); } -- cgit v1.2.3