diff options
author | wm4 <wm4@nowhere> | 2016-07-04 11:44:44 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-07-04 11:54:02 +0200 |
commit | 7cd1a3c766d002eb91790aa6d57f1828acd372ca (patch) | |
tree | 62df91f55f173a736d5422e08a6ad541c6b52664 /video | |
parent | 46f1ce1e2f72bf418bbb4c00f3e4ef4fbac82356 (diff) | |
download | mpv-7cd1a3c766d002eb91790aa6d57f1828acd372ca.tar.bz2 mpv-7cd1a3c766d002eb91790aa6d57f1828acd372ca.tar.xz |
vf_d3d11vpp: fix output image format if not doing any filtering
For example it should be set to IMGFMT_D3D11NV12 if it isn't already.
Otherwise, an assertion in vf.c could trigger.
This probably couldn't be provoked yet.
Diffstat (limited to 'video')
-rw-r--r-- | video/filter/vf_d3d11vpp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/video/filter/vf_d3d11vpp.c b/video/filter/vf_d3d11vpp.c index 658aec25b8..100400757e 100644 --- a/video/filter/vf_d3d11vpp.c +++ b/video/filter/vf_d3d11vpp.c @@ -360,8 +360,11 @@ static int filter_out(struct vf_instance *vf) // no filtering if (!mp_refqueue_should_deint(p->queue) && !p->require_filtering) { - struct mp_image *in = mp_refqueue_get(p->queue, 0); - vf_add_output_frame(vf, mp_image_new_ref(in)); + struct mp_image *in = mp_image_new_ref(mp_refqueue_get(p->queue, 0)); + if (!in) + return -1; + mp_image_set_params(in, &p->out_params); + vf_add_output_frame(vf, in); mp_refqueue_next(p->queue); return 0; } |