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
1 changed files with 2 additions and 0 deletions

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);