1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-17 12:31:25 +00:00

d3d11va: fix invalid deref on decoder init failure

fixes #3092
This commit is contained in:
Kevin Mitchell 2016-04-29 23:36:01 -07:00
parent 64f9e48bf1
commit 8d51f08010

View File

@ -232,6 +232,7 @@ static int d3d11va_init_decoder(struct lavc_ctx *s, int w, int h)
struct priv *p = s->hwdec_priv;
TA_FREEP(&p->decoder);
ID3D11Texture2D *texture = NULL;
void *tmp = talloc_new(NULL);
UINT n_guids = ID3D11VideoDevice_GetVideoDecoderProfileCount(p->video_dev);
@ -264,7 +265,6 @@ static int d3d11va_init_decoder(struct lavc_ctx *s, int w, int h)
int w_align = w, h_align = h;
d3d_surface_align(s, &w_align, &h_align);
ID3D11Texture2D *texture = NULL;
D3D11_TEXTURE2D_DESC tex_desc = {
.Width = w_align,
.Height = h_align,