[FFmpeg-devel] [PATCH 03/13] lavfi/vf_lut3d: check fclose return value
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Tue Jan 12 05:25:05 CET 2016
Maybe theoretical; since the file is opened in read-only mode.
Nevertheless, it is a good idea to check the return value.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
libavfilter/vf_lut3d.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavfilter/vf_lut3d.c b/libavfilter/vf_lut3d.c
index 2b8e027..45477d4 100644
--- a/libavfilter/vf_lut3d.c
+++ b/libavfilter/vf_lut3d.c
@@ -602,7 +602,8 @@ static av_cold int lut3d_init(AVFilterContext *ctx)
}
end:
- fclose(f);
+ if(fclose(f))
+ av_log(ctx, AV_LOG_WARNING, "%s: %s\n", lut3d->file, av_err2str(AVERROR(errno)));
return ret;
}
--
2.7.0
More information about the ffmpeg-devel
mailing list