[FFmpeg-cvslog] avfilter/vf_telecine: avoid possible null-pointer dereference

Paul B Mahol git at videolan.org
Tue Apr 14 13:13:50 EEST 2020


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Apr 14 12:12:42 2020 +0200| [ce24b1def0268ad2fdc220a8f5ce26b1dd6cfb79] | committer: Paul B Mahol

avfilter/vf_telecine: avoid possible null-pointer dereference

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce24b1def0268ad2fdc220a8f5ce26b1dd6cfb79
---

 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);



More information about the ffmpeg-cvslog mailing list