hwdec_ios: fix crash after mapper_init failure

This commit is contained in:
Aman Gupta 2018-04-16 14:29:26 -07:00 committed by Jan Ekström
parent 8f1c40f702
commit ed7bc3a5f3
1 changed files with 4 additions and 2 deletions

View File

@ -253,8 +253,10 @@ static void mapper_uninit(struct ra_hwdec_mapper *mapper)
struct priv *p = mapper->priv;
CVPixelBufferRelease(p->pbuf);
CFRelease(p->gl_texture_cache);
p->gl_texture_cache = NULL;
if (p->gl_texture_cache) {
CFRelease(p->gl_texture_cache);
p->gl_texture_cache = NULL;
}
}
const struct ra_hwdec_driver ra_hwdec_videotoolbox = {