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:
parent
078f5f300d
commit
f22acd94af
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user