[vlc-commits] [Git][videolan/vlc][master] interop: dxva2: use vlc_alloc

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Apr 10 04:54:31 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
93ce57e8 by François Cartegnie at 2026-04-10T04:31:56+00:00
interop: dxva2: use vlc_alloc

- - - - -


1 changed file:

- modules/video_output/opengl/interop_dxva2.c


Changes:

=====================================
modules/video_output/opengl/interop_dxva2.c
=====================================
@@ -304,7 +304,7 @@ static int InitRangeProcessor(struct vlc_gl_interop *interop, IDirect3DDevice9Ex
         goto error;
     }
 
-    formatsList = malloc(devcaps.InputFormatCount * sizeof(*formatsList));
+    formatsList = vlc_alloc(devcaps.InputFormatCount, sizeof(*formatsList));
     if (unlikely(formatsList == NULL))
     {
         msg_Dbg(interop, "Failed to allocate %u input formats", devcaps.InputFormatCount);
@@ -325,7 +325,7 @@ static int InitRangeProcessor(struct vlc_gl_interop *interop, IDirect3DDevice9Ex
     }
 
     free(formatsList);
-    formatsList = malloc(devcaps.OutputFormatCount * sizeof(*formatsList));
+    formatsList = vlc_alloc(devcaps.OutputFormatCount, sizeof(*formatsList));
     if (unlikely(formatsList == NULL))
     {
         msg_Dbg(interop, "Failed to allocate %u output formats", devcaps.OutputFormatCount);
@@ -344,7 +344,7 @@ static int InitRangeProcessor(struct vlc_gl_interop *interop, IDirect3DDevice9Ex
         goto error;
     }
 
-    capsList = malloc(devcaps.VideoProcessorCount * sizeof(*capsList));
+    capsList = vlc_alloc(devcaps.VideoProcessorCount, sizeof(*capsList));
     if (unlikely(capsList == NULL))
     {
         msg_Dbg(interop, "Failed to allocate %u video processors", devcaps.VideoProcessorCount);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/93ce57e86acceb5f72bcada1584c0ca3419da775

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




More information about the vlc-commits mailing list