mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
dxva2: fix crash on initialization failure
If dxva2_init() fails, dxva2_uninit() will be called twice.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user