summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/decode/d3d11va.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/video/decode/d3d11va.c b/video/decode/d3d11va.c
index 8ce026bc96..d929e1e70f 100644
--- a/video/decode/d3d11va.c
+++ b/video/decode/d3d11va.c
@@ -51,7 +51,6 @@ struct priv {
struct d3d11va_surface {
ID3D11Texture2D *texture;
- int subindex;
ID3D11VideoDecoderOutputView *surface;
};
@@ -81,7 +80,6 @@ static struct mp_image *d3d11va_new_ref(ID3D11VideoDecoderOutputView *view,
D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC surface_desc;
ID3D11VideoDecoderOutputView_GetDesc(surface->surface, &surface_desc);
- surface->subindex = surface_desc.Texture2D.ArraySlice;
struct mp_image *mpi =
mp_image_new_custom_ref(NULL, surface, d3d11va_release_img);
@@ -92,7 +90,7 @@ static struct mp_image *d3d11va_new_ref(ID3D11VideoDecoderOutputView *view,
mp_image_set_size(mpi, w, h);
mpi->planes[0] = NULL;
mpi->planes[1] = (void *)surface->texture;
- mpi->planes[2] = (void *)(intptr_t)surface->subindex;
+ mpi->planes[2] = (void *)(intptr_t)surface_desc.Texture2D.ArraySlice;
mpi->planes[3] = (void *)surface->surface;
return mpi;