diff options
author | wm4 <wm4@nowhere> | 2014-10-26 15:37:49 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-26 15:42:47 +0100 |
commit | f22acd94aff9c5e24ec87ce9a914cbdb14d5cb7e (patch) | |
tree | bf037dd08cef6dd23249513f70c7ba8d83d41ae4 /video/decode | |
parent | 078f5f300dc776dd78608fb5c0048cb77e92e6cf (diff) | |
download | mpv-f22acd94aff9c5e24ec87ce9a914cbdb14d5cb7e.tar.bz2 mpv-f22acd94aff9c5e24ec87ce9a914cbdb14d5cb7e.tar.xz |
dxva2: fix crash on initialization failure
If dxva2_init() fails, dxva2_uninit() will be called twice.
Diffstat (limited to 'video/decode')
-rw-r--r-- | video/decode/dxva2.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |