vf_softpulldown: handle null mpi_image correctly

Check if mpi is NULL before accessing mpi->fields.
This commit is contained in:
shdown
2014-08-30 15:02:23 +04:00
committed by wm4
parent 3307af43c5
commit 730d94741c

View File

@@ -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)
{