[vlc-commits] vmem: unroll sys->unlock check
Rémi Denis-Courmont
git at videolan.org
Mon Feb 8 22:32:49 CET 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Feb 8 23:26:29 2016 +0200| [31872a222a823ad2d4b3f4070fa3d13dd2e0dc51] | committer: Rémi Denis-Courmont
vmem: unroll sys->unlock check
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=31872a222a823ad2d4b3f4070fa3d13dd2e0dc51
---
modules/video_output/vmem.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/modules/video_output/vmem.c b/modules/video_output/vmem.c
index 11293b7..7433f96 100644
--- a/modules/video_output/vmem.c
+++ b/modules/video_output/vmem.c
@@ -119,9 +119,7 @@ static void Unlock(void *data, picture_t *pic)
for (int i = 0; i < pic->i_planes; i++)
planes[i] = pic->p[i].p_pixels;
- if (sys->unlock != NULL)
- sys->unlock(sys->opaque, picsys->id, planes);
-
+ sys->unlock(sys->opaque, picsys->id, planes);
}
/*****************************************************************************
@@ -256,7 +254,8 @@ static void Close(vlc_object_t *object)
if (sys->pool)
{
- picture_pool_Enum(sys->pool, Unlock, sys);
+ if (sys->unlock != NULL)
+ picture_pool_Enum(sys->pool, Unlock, sys);
picture_pool_Release(sys->pool);
}
free(sys);
More information about the vlc-commits
mailing list