Skip to content

Commit e9dcd38

Browse files
committed
code formatting
1 parent b35c4c1 commit e9dcd38

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

haishinkit/src/main/java/com/haishinkit/rtmp/RtmpSession.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ internal class RtmpSession(
5353
override fun handleEvent(event: Event) {
5454
val data = EventUtils.toMap(event)
5555
if (BuildConfig.DEBUG) {
56-
Log.d(TAG, "$data['code']")
56+
Log.d(TAG, "$data")
5757
}
5858
when (data["code"]) {
5959
RtmpConnection.Code.CONNECT_SUCCESS.rawValue -> {
@@ -69,9 +69,6 @@ internal class RtmpSession(
6969
}
7070

7171
else -> {
72-
if (connection.isConnected) {
73-
connection.close()
74-
}
7572
continuation?.resume(Result.failure(RtmpStatusException("${data["code"]}")))
7673
continuation = null
7774
}

haishinkit/src/main/java/com/haishinkit/rtmp/RtmpStream.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ class RtmpStream(
432432
internal fun configure(decoderConfigurationRecord: DecoderConfigurationRecord): Boolean {
433433
if (decoderConfigurationRecord.configure(videoCodec)) {
434434
decoderConfigurationRecord.videoSize?.let {
435-
screen?.frame = Rect(0, 0, it.width, it.height)
435+
screen.frame = Rect(0, 0, it.width, it.height)
436436
video.videoSize = it
437437
}
438438
videoCodec.startRunning()

haishinkit/src/main/java/com/haishinkit/stream/Stream.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ abstract class Stream(
230230
}
231231

232232
Codec.MODE_DECODE -> {
233-
screen?.addChild(video)
233+
screen.addChild(video)
234234
mediaLink.startRunning()
235235
}
236236
}
@@ -249,7 +249,7 @@ abstract class Stream(
249249

250250
Codec.MODE_DECODE -> {
251251
mediaLink.stopRunning()
252-
screen?.removeChild(video)
252+
screen.removeChild(video)
253253
hasAudio = false
254254
hasVideo = false
255255
}

0 commit comments

Comments
 (0)