From f22acd94aff9c5e24ec87ce9a914cbdb14d5cb7e Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 26 Oct 2014 15:37:49 +0100 Subject: dxva2: fix crash on initialization failure If dxva2_init() fails, dxva2_uninit() will be called twice. --- video/decode/dxva2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/video/decode/dxva2.c b/video/decode/dxva2.c index e03014438a..f2a70f099d 100644 --- a/video/decode/dxva2.c +++ b/video/decode/dxva2.c @@ -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); -- cgit v1.2.3