[FFmpeg-devel] [PATCH 02/13] lavfi/vf_deshake: check fclose return value

Tobias Rapp t.rapp at noa-archive.com
Tue Jan 12 16:53:54 CET 2016


On 12.01.2016 05:25, Ganesh Ajjanagadde wrote:
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
>   libavfilter/vf_deshake.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c
> index e7ece44..a89506b 100644
> --- a/libavfilter/vf_deshake.c
> +++ b/libavfilter/vf_deshake.c
> @@ -423,7 +423,10 @@ static av_cold void uninit(AVFilterContext *ctx)
>       av_freep(&deshake->angles);
>       deshake->angles_size = 0;
>       if (deshake->fp)
> -        fclose(deshake->fp);
> +        if (fclose(deshake->fp))
> +            av_log(ctx, AV_LOG_WARNING,
> +                   "Unable to close motion search log \"%s\": %s\n",
> +                   deshake->filename, av_err2str(AVERROR(errno)));
>   }
>
>   static int filter_frame(AVFilterLink *link, AVFrame *in)
>

Nit-pick: Maybe put the inner "if" inside braces?



More information about the ffmpeg-devel mailing list