[vlc-commits] direct3d9: Don't create a new picture pool for each frame

Hugo Beauzée-Luyssen git at videolan.org
Thu Apr 27 17:59:27 CEST 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Apr 27 17:18:30 2017 +0200| [4edfcab6467425963a5ca2964c83a17a7ec1b060] | committer: Hugo Beauzée-Luyssen

direct3d9: Don't create a new picture pool for each frame

This "might" explain the recent performance complains...

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4edfcab6467425963a5ca2964c83a17a7ec1b060
---

 modules/video_output/win32/direct3d9.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 080721db82..64b132800b 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -384,6 +384,9 @@ static picture_pool_t *Direct3D9CreatePicturePool(vout_display_t *vd, unsigned c
     picture_t**       pictures = NULL;
     unsigned          picture_count = 0;
 
+    if ( vd->sys->sys.pool != NULL )
+        return vd->sys->sys.pool;
+
     pictures = calloc(count, sizeof(*pictures));
     if (!pictures)
         goto error;



More information about the vlc-commits mailing list