[vlc-commits] va_surface: release the surfaces held locally in DestroyVideoDecoder()
Steve Lhomme
git at videolan.org
Thu Jun 22 17:27:19 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Tue Jun 20 08:48:55 2017 +0200| [b3312be9717b59b8e799ea7a973d37a5a3be2f80] | committer: Jean-Baptiste Kempf
va_surface: release the surfaces held locally in DestroyVideoDecoder()
If upper levels still hold references they will still be usable.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b3312be9717b59b8e799ea7a973d37a5a3be2f80
---
modules/codec/avcodec/va_surface.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/codec/avcodec/va_surface.c b/modules/codec/avcodec/va_surface.c
index 3c425c2780..fe15966888 100644
--- a/modules/codec/avcodec/va_surface.c
+++ b/modules/codec/avcodec/va_surface.c
@@ -43,6 +43,8 @@ struct picture_sys_t {
static void DestroyVideoDecoder(vlc_va_t *va, va_pool_t *va_pool)
{
+ for (unsigned i = 0; i < va_pool->surface_count; i++)
+ va_surface_Release(va_pool->surface[i]->va_surface);
va_pool->pf_destroy_surfaces(va);
va_pool->surface_count = 0;
}
More information about the vlc-commits
mailing list