Skip to content

Commit b6277d3

Browse files
committed
fix(core): make frame pts and dts immutable
1 parent d9a514d commit b6277d3

File tree

2 files changed

+4
-4
lines changed
  • core/src/main/java/io/github/thibaultbee/streampack/core/elements/data
  • extensions/rtmp/src/main/java/io/github/thibaultbee/streampack/ext/rtmp/elements/endpoints

2 files changed

+4
-4
lines changed

core/src/main/java/io/github/thibaultbee/streampack/core/elements/data/Frame.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ data class Frame(
6161
/**
6262
* Presentation timestamp in µs
6363
*/
64-
var ptsInUs: Long,
64+
val ptsInUs: Long,
6565

6666
/**
6767
* Decoded timestamp in µs (not used).
6868
*/
69-
var dtsInUs: Long?,
69+
val dtsInUs: Long? = null,
7070

7171
/**
7272
* [Boolean.true] if frame is a key frame (I-frame for AVC/HEVC and audio frames)

extensions/rtmp/src/main/java/io/github/thibaultbee/streampack/ext/rtmp/elements/endpoints/RtmpEndpoint.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class RtmpEndpoint internal constructor(private val coroutineDispatcher: Corouti
107107
rtmpClient.write(
108108
flvData,
109109
ts.toInt(),
110-
).await()
110+
)
111111
}
112112
if (flvData is AutoCloseable) {
113113
flvData.close()
@@ -149,7 +149,7 @@ class RtmpEndpoint internal constructor(private val coroutineDispatcher: Corouti
149149
rtmpClient.writeSetDataFrame(
150150
flvDataBuilder.metadata
151151
)
152-
}.await()
152+
}
153153
}
154154

155155
override suspend fun stopStream() {

0 commit comments

Comments
 (0)