summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_vdpaupp.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2015-07-13 19:30:31 -0700
committerwm4 <wm4@nowhere>2015-07-14 11:10:04 +0200
commite1ab9b905fa50c92d0fcee3a1e37f55109f98775 (patch)
tree0df21b63ecdcdaf8ab5c88a80a3c6d8401d95ded /video/filter/vf_vdpaupp.c
parentf3e8108c7813f7a8a2a984c662211b29bdfb77b1 (diff)
downloadmpv-e1ab9b905fa50c92d0fcee3a1e37f55109f98775.tar.bz2
mpv-e1ab9b905fa50c92d0fcee3a1e37f55109f98775.tar.xz
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.
Diffstat (limited to 'video/filter/vf_vdpaupp.c')
-rw-r--r--video/filter/vf_vdpaupp.c2
1 files changed, 1 insertions, 1 deletions
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;