]> git.sesse.net Git - vlc/commitdiff
MSW/GDI: simplify pool creation
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 30 Oct 2014 14:03:59 +0000 (16:03 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 30 Oct 2014 14:03:59 +0000 (16:03 +0200)
modules/video_output/msw/wingdi.c

index 761af9a3f43e92e9a22230c855b4357498789b98..1886f8524eb73a8570837c8eee56428964690c8d 100644 (file)
@@ -290,13 +290,9 @@ static int Init(vout_display_t *vd,
     rsc.p[0].i_pitch  = i_pic_pitch;;
 
     picture_t *picture = picture_NewFromResource(fmt, &rsc);
-    if (picture) {
-        picture_pool_configuration_t cfg;
-        memset(&cfg, 0, sizeof(cfg));
-        cfg.picture_count = 1;
-        cfg.picture = &picture;
-        sys->pool = picture_pool_NewExtended(&cfg);
-    } else
+    if (picture != NULL)
+        sys->pool = picture_pool_New(1, &picture);
+    else
         sys->pool = NULL;
 
     UpdateRects(vd, NULL, NULL, true);