diff options
author | wm4 <wm4@nowhere> | 2016-04-27 14:03:30 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-04-27 14:06:50 +0200 |
commit | dff33893f2ea91f425bceeec6596556d569e0370 (patch) | |
tree | adf74118a9b1b00a425beba03a2dcbe39d3f3fc9 /video/out/opengl | |
parent | 98969946883e4985f9b65e4987f59c65452a6fe4 (diff) | |
download | mpv-dff33893f2ea91f425bceeec6596556d569e0370.tar.bz2 mpv-dff33893f2ea91f425bceeec6596556d569e0370.tar.xz |
d3d11va: store texture/subindex in IMGFMT_D3D11VA plane pointers
Basically this gets rid of the need for the accessors in d3d11va.h, and
the code can be cleaned up a little bit.
Note that libavcodec only defines a ID3D11VideoDecoderOutputView pointer
in the last plane pointers, but it tolerates/passes through the other
plane pointers we set.
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/hwdec_d3d11egl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/opengl/hwdec_d3d11egl.c b/video/out/opengl/hwdec_d3d11egl.c index 44bab2c245..abb5831670 100644 --- a/video/out/opengl/hwdec_d3d11egl.c +++ b/video/out/opengl/hwdec_d3d11egl.c @@ -17,6 +17,8 @@ #include <assert.h> #include <windows.h> +#include <d3d11.h> + #include <EGL/egl.h> #include <EGL/eglext.h> @@ -24,7 +26,6 @@ #include "osdep/timer.h" #include "osdep/windows_utils.h" #include "hwdec.h" -#include "video/d3d11va.h" #include "video/d3d.h" #include "video/hwdec.h" @@ -352,8 +353,8 @@ static int map_image(struct gl_hwdec *hw, struct mp_image *hw_image, if (!p->gl_texture) return -1; - ID3D11Texture2D *d3d_tex = d3d11_texture_in_mp_image(hw_image); - int d3d_subindex = d3d11_subindex_in_mp_image(hw_image); + ID3D11Texture2D *d3d_tex = (void *)hw_image->planes[1]; + int d3d_subindex = (intptr_t)hw_image->planes[2]; if (!d3d_tex) return -1; |