1
0
Эх сурвалжийг харах

mac-avcapture: Clear memory when creating frame struct

(cherry picked from commit 68c4617927caec3c74653e1282d349a1480ab554)
jcm 7 сар өмнө
parent
commit
96b9166815

+ 2 - 2
plugins/mac-avcapture/plugin-main.m

@@ -20,8 +20,8 @@ static void *av_capture_create(obs_data_t *settings, obs_source_t *source)
     capture_data->isFastPath = false;
     capture_data->isFastPath = false;
     capture_data->settings = settings;
     capture_data->settings = settings;
     capture_data->source = source;
     capture_data->source = source;
-    capture_data->videoFrame = bmalloc(sizeof(OBSAVCaptureVideoFrame));
-    capture_data->audioFrame = bmalloc(sizeof(OBSAVCaptureAudioFrame));
+    capture_data->videoFrame = bzalloc(sizeof(OBSAVCaptureVideoFrame));
+    capture_data->audioFrame = bzalloc(sizeof(OBSAVCaptureAudioFrame));
 
 
     OBSAVCapture *capture = [[OBSAVCapture alloc] initWithCaptureInfo:capture_data];
     OBSAVCapture *capture = [[OBSAVCapture alloc] initWithCaptureInfo:capture_data];