1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-26 01:23:17 +00:00

dxva2: fix crash on initialization failure

If dxva2_init() fails, dxva2_uninit() will be called twice.
This commit is contained in:
wm4 2014-10-26 15:37:49 +01:00
parent 078f5f300d
commit f22acd94af

View File

@ -157,6 +157,8 @@ static void dxva2_destroy_decoder(struct lavc_ctx *s)
static void dxva2_uninit(struct lavc_ctx *s)
{
DXVA2Context *ctx = s->hwdec_priv;
if (!ctx)
return;
if (ctx->decoder)
dxva2_destroy_decoder(s);