summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-05-25 22:01:09 +0200
committerwm4 <wm4@nowhere>2016-05-25 23:51:24 +0200
commitfc18e1df6224229d5e95bb9d1855f88690e655b3 (patch)
treebc351923371fd0699eba5e9feca6e54294c27443 /video
parent68191fdca7c3e76d619998f612a66dd028885baa (diff)
downloadmpv-fc18e1df6224229d5e95bb9d1855f88690e655b3.tar.bz2
mpv-fc18e1df6224229d5e95bb9d1855f88690e655b3.tar.xz
vf_vavpp: minor simplification
Diffstat (limited to 'video')
-rw-r--r--video/filter/vf_vavpp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/video/filter/vf_vavpp.c b/video/filter/vf_vavpp.c
index 7dc6680ad0..1d131d0cde 100644
--- a/video/filter/vf_vavpp.c
+++ b/video/filter/vf_vavpp.c
@@ -150,10 +150,12 @@ static inline int get_deint_field(struct vf_priv_s *p, int i,
return !!(mpi->fields & MP_IMGFIELD_TOP_FIRST) ^ i ? VA_TOP_FIELD : VA_BOTTOM_FIELD;
}
-static struct mp_image *render(struct vf_instance *vf, struct mp_image *in,
- unsigned int flags)
+static struct mp_image *render(struct vf_instance *vf, unsigned int flags)
{
struct vf_priv_s *p = vf->priv;
+
+ struct mp_image *in = mp_refqueue_get(p->queue, 0);
+
VASurfaceID in_id = va_surface_id(in);
if (!p->pipe.filters || in_id == VA_INVALID_ID)
return NULL;
@@ -250,7 +252,7 @@ static void output_frames(struct vf_instance *vf)
vf_add_output_frame(vf, mp_image_new_ref(in));
return;
}
- struct mp_image *out1 = render(vf, in, field | csp);
+ struct mp_image *out1 = render(vf, field | csp);
if (!out1) { // cannot render
vf_add_output_frame(vf, mp_image_new_ref(in));
return;
@@ -263,7 +265,7 @@ static void output_frames(struct vf_instance *vf)
double next_pts = mp_refqueue_get_field_pts(p->queue, 1);
if (next_pts == MP_NOPTS_VALUE) // no pts, skip it
return;
- struct mp_image *out2 = render(vf, in, get_deint_field(p, 1, in) | csp);
+ struct mp_image *out2 = render(vf, get_deint_field(p, 1, in) | csp);
if (!out2) // cannot render
return;
mp_image_copy_attributes(out2, in);