Browse Source

mac-virtualcam: Release pixel buffer pool for DAL as well

The pixel buffer pool is used to create pixel buffers with both the CMIO
extension and the DAL plugin. As such, it is created independent of
which camera type is used, and should be released independent of it as
well.
gxalpha 2 years ago
parent
commit
2a4c8594a1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/mac-virtualcam/src/obs-plugin/plugin-main.mm

+ 1 - 1
plugins/mac-virtualcam/src/obs-plugin/plugin-main.mm

@@ -540,10 +540,10 @@ static void virtualcam_output_stop(void *data, uint64_t ts)
 	if (cmio_extension_supported()) {
 		CMIODeviceStopStream(vcam->deviceID, vcam->streamID);
 		CFRelease(vcam->formatDescription);
-		CVPixelBufferPoolRelease(vcam->pool);
 	} else {
 		[vcam->machServer stop];
 	}
+	CVPixelBufferPoolRelease(vcam->pool);
 }
 
 static void virtualcam_output_raw_video(void *data, struct video_data *frame)