-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix video capturing fails on iOS 18.1.1 (#148)
- Loading branch information
Showing
2 changed files
with
104 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
webrtc-kmp/src/iosMain/kotlin/com/shepeliev/webrtckmp/utils/Cintetop.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.shepeliev.webrtckmp.utils | ||
|
||
import kotlinx.cinterop.CStructVar | ||
import kotlinx.cinterop.CValue | ||
import kotlinx.cinterop.ExperimentalForeignApi | ||
import kotlinx.cinterop.useContents | ||
|
||
@OptIn(ExperimentalForeignApi::class) | ||
internal inline fun <reified T : CStructVar> CValue<T>.copyContents(): T { | ||
lateinit var value: T | ||
this.useContents { value = this } | ||
return value | ||
} |