[vlc-commits] [Git][videolan/vlc][master] vout: direct3d9: use vlc_alloc

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Apr 9 19:46:07 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
5dee7ce5 by François Cartegnie at 2026-04-09T19:13:06+00:00
vout: direct3d9: use vlc_alloc

- - - - -


1 changed file:

- modules/video_output/win32/direct3d9.c


Changes:

=====================================
modules/video_output/win32/direct3d9.c
=====================================
@@ -1490,7 +1490,7 @@ static int InitRangeProcessor(vout_display_t *vd, const d3d9_format_t *d3dfmt,
         goto error;
     }
 
-    formatsList = malloc(devcaps.InputFormatCount * sizeof(*formatsList));
+    formatsList = vlc_alloc(devcaps.InputFormatCount, sizeof(*formatsList));
     if (unlikely(formatsList == NULL))
     {
         msg_Dbg(vd, "Failed to allocate %u input formats", devcaps.InputFormatCount);
@@ -1511,7 +1511,7 @@ static int InitRangeProcessor(vout_display_t *vd, const d3d9_format_t *d3dfmt,
     }
 
     free(formatsList);
-    formatsList = malloc(devcaps.OutputFormatCount * sizeof(*formatsList));
+    formatsList = vlc_alloc(devcaps.OutputFormatCount, sizeof(*formatsList));
     if (unlikely(formatsList == NULL))
     {
         msg_Dbg(vd, "Failed to allocate %u output formats", devcaps.OutputFormatCount);
@@ -1530,7 +1530,7 @@ static int InitRangeProcessor(vout_display_t *vd, const d3d9_format_t *d3dfmt,
         goto error;
     }
 
-    capsList = malloc(devcaps.VideoProcessorCount * sizeof(*capsList));
+    capsList = vlc_alloc(devcaps.VideoProcessorCount, sizeof(*capsList));
     if (unlikely(capsList == NULL))
     {
         msg_Dbg(vd, "Failed to allocate %u video processors", devcaps.VideoProcessorCount);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5dee7ce5170b1f0a834d1fbbab4ef14d60414286

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5dee7ce5170b1f0a834d1fbbab4ef14d60414286
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list