瀏覽代碼

mac-avcapture: Clear memory when creating frame struct

(cherry picked from commit 68c4617927caec3c74653e1282d349a1480ab554)
jcm 7 月之前
父節點
當前提交
96b9166815
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      plugins/mac-avcapture/plugin-main.m

+ 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->settings = settings;
     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];