Skip to content

Commit 290570b

Browse files
sebastian-s-beckmannPatTheMav
authored andcommitted
mac-capture: Use error code constant instead of magic number
1 parent e860289 commit 290570b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

plugins/mac-capture/mac-sck-audio-capture.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ static void destroy_audio_screen_stream(struct screen_capture *sc)
99
{
1010
if (sc->disp && !sc->capture_failed) {
1111
[sc->disp stopCaptureWithCompletionHandler:^(NSError *_Nullable error) {
12-
if (error && error.code != 3808) {
12+
if (error && error.code != SCStreamErrorAttemptToStopStreamState) {
1313
MACCAP_ERR("destroy_audio_screen_stream: Failed to stop stream with error %s\n",
1414
[[error localizedFailureReason] cStringUsingEncoding:NSUTF8StringEncoding]);
1515
}

plugins/mac-capture/mac-sck-video-capture.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ static void destroy_screen_stream(struct screen_capture *sc)
44
{
55
if (sc->disp && !sc->capture_failed) {
66
[sc->disp stopCaptureWithCompletionHandler:^(NSError *_Nullable error) {
7-
if (error && error.code != 3808) {
7+
if (error && error.code != SCStreamErrorAttemptToStopStreamState) {
88
MACCAP_ERR("destroy_screen_stream: Failed to stop stream with error %s\n",
99
[[error localizedFailureReason] cStringUsingEncoding:NSUTF8StringEncoding]);
1010
}

0 commit comments

Comments
 (0)