From ce24b1def0268ad2fdc220a8f5ce26b1dd6cfb79 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 14 Apr 2020 12:12:42 +0200 Subject: [PATCH] avfilter/vf_telecine: avoid possible null-pointer dereference --- libavfilter/vf_telecine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_telecine.c b/libavfilter/vf_telecine.c index ff8151dfc9..741b19a4f1 100644 --- a/libavfilter/vf_telecine.c +++ b/libavfilter/vf_telecine.c @@ -240,8 +240,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) for (i = 0; i < nout; i++) { AVFrame *frame = av_frame_clone(s->frame[i]); - int interlaced = frame->interlaced_frame; - int tff = frame->top_field_first; + int interlaced = frame ? frame->interlaced_frame : 0; + int tff = frame ? frame->top_field_first : 0; if (!frame) { av_frame_free(&inpicref);