[vlc-commits] va_surface: allow closing uninitialized pools
Steve Lhomme
git at videolan.org
Fri Sep 27 17:22:20 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Sep 27 17:17:47 2019 +0200| [245d76e6084017cd46d1282f628f031388e11b54] | committer: Steve Lhomme
va_surface: allow closing uninitialized pools
It makes closing partically initialized VA's easier
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=245d76e6084017cd46d1282f628f031388e11b54
---
modules/codec/avcodec/va_surface.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/va_surface.c b/modules/codec/avcodec/va_surface.c
index a895a9b33a..643dbd39e4 100644
--- a/modules/codec/avcodec/va_surface.c
+++ b/modules/codec/avcodec/va_surface.c
@@ -170,8 +170,11 @@ void va_surface_Release(vlc_va_surface_t *surface)
void va_pool_Close(vlc_va_t *va, va_pool_t *va_pool)
{
- DestroyVideoDecoder(va->sys, va_pool);
- va_pool->callbacks->pf_destroy_device(va);
+ if (va_pool->callbacks)
+ {
+ DestroyVideoDecoder(va->sys, va_pool);
+ va_pool->callbacks->pf_destroy_device(va);
+ }
}
int va_pool_Open(vlc_va_t *va, const struct va_pool_cfg *cbs, va_pool_t *va_pool)
More information about the vlc-commits
mailing list