[FFmpeg-devel] [PATCH 07/13] lavfi/vf_vidstabdetect: check fclose return value

Ganesh Ajjanagadde gajjanagadde at gmail.com
Tue Jan 12 05:25:09 CET 2016


Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
 libavfilter/vf_vidstabdetect.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_vidstabdetect.c b/libavfilter/vf_vidstabdetect.c
index 4742949..a91968a 100644
--- a/libavfilter/vf_vidstabdetect.c
+++ b/libavfilter/vf_vidstabdetect.c
@@ -75,7 +75,10 @@ static av_cold void uninit(AVFilterContext *ctx)
     VSMotionDetect *md = &(s->md);
 
     if (s->f) {
-        fclose(s->f);
+        if (fclose(s->f))
+            av_log(ctx, AV_LOG_ERROR,
+                   "Unable to close transform file, loss of information possible: %s\n",
+                   av_err2str(AVERROR(errno)));
         s->f = NULL;
     }
 
-- 
2.7.0



More information about the ffmpeg-devel mailing list