From 730d94741c4d528340ec26d3dbf4341da76b4918 Mon Sep 17 00:00:00 2001 From: shdown Date: Sat, 30 Aug 2014 15:02:23 +0400 Subject: vf_softpulldown: handle null mpi_image correctly Check if mpi is NULL before accessing mpi->fields. --- video/filter/vf_softpulldown.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/video/filter/vf_softpulldown.c b/video/filter/vf_softpulldown.c index cc2742ee72..83670a2724 100644 --- a/video/filter/vf_softpulldown.c +++ b/video/filter/vf_softpulldown.c @@ -50,13 +50,13 @@ static void copy_pic_field(struct mp_image *dmpi, struct mp_image *mpi, int f) static int filter(struct vf_instance *vf, struct mp_image *mpi) { + if (!mpi) + return 0; + int flags = mpi->fields; int state = vf->priv->state; struct vf_priv_s *p = vf->priv; - if (!mpi) - return 0; - if (!p->buffer || p->buffer->w != mpi->w || p->buffer->h != mpi->h || p->buffer->imgfmt != mpi->imgfmt) { -- cgit v1.2.3