diff options
author | shdown <shdownnine@gmail.com> | 2014-08-30 15:02:23 +0400 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-08-30 15:15:38 +0200 |
commit | 730d94741c4d528340ec26d3dbf4341da76b4918 (patch) | |
tree | 7a27281aa907f405bcf75d11eddb118c5962d7d9 | |
parent | 3307af43c59e1d61f8f31b3fddfb9fdcd53992b0 (diff) |
vf_softpulldown: handle null mpi_image correctly
Check if mpi is NULL before accessing mpi->fields.
-rw-r--r-- | video/filter/vf_softpulldown.c | 6 |
1 files 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) { |