[FFmpeg-devel] [PATCH 06/13] lavfi/vf_ssim: check fclose return value

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


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

diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c
index 7c43e98..1050b68 100644
--- a/libavfilter/vf_ssim.c
+++ b/libavfilter/vf_ssim.c
@@ -360,7 +360,10 @@ static av_cold void uninit(AVFilterContext *ctx)
     ff_dualinput_uninit(&s->dinput);
 
     if (s->stats_file && s->stats_file != stdout)
-        fclose(s->stats_file);
+        if (fclose(s->stats_file))
+            av_log(NULL, AV_LOG_ERROR,
+                   "Unable to close file '%s', loss of information possible: %s\n",
+                   s->stats_file_str, av_err2str(AVERROR(errno)));
 
     av_freep(&s->temp);
 }
-- 
2.7.0



More information about the ffmpeg-devel mailing list