From e1ab9b905fa50c92d0fcee3a1e37f55109f98775 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Mon, 13 Jul 2015 19:30:31 -0700 Subject: vf_vdpaupp: Don't crash when evaluating interlacing of NULL mpi The interlaced frame test needs to be aware that the input mpi might be NULL - this happens at the end of a stream when the input frames have all been submitted but frames still need to be drained from the decoder. --- video/filter/vf_vdpaupp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/filter/vf_vdpaupp.c b/video/filter/vf_vdpaupp.c index 53ea6083ed..882b80d9e2 100644 --- a/video/filter/vf_vdpaupp.c +++ b/video/filter/vf_vdpaupp.c @@ -151,7 +151,7 @@ static int filter_ext(struct vf_instance *vf, struct mp_image *mpi) p->prev_pos += 2; } - bool deint = (mpi->fields & MP_IMGFIELD_INTERLACED) || !p->interlaced_only; + bool deint = (mpi && (mpi->fields & MP_IMGFIELD_INTERLACED)) || !p->interlaced_only; while (1) { int current = p->prev_pos - 1; -- cgit v1.2.3