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.
This commit is contained in:
Philip Langdale 2015-07-13 19:30:31 -07:00 committed by wm4
parent f3e8108c78
commit e1ab9b905f
1 changed files with 1 additions and 1 deletions

View File

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