Skip to content

Commit

Permalink
Support FLVVideoPacketType.codedFramesX frame.
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo4405 committed Mar 24, 2024
1 parent f4bcd1a commit bf0e8a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/RTMP/RTMPMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ final class RTMPVideoMessage: RTMPMessage {
}

private var offset: Int {
return isExHeader ? 3 : 0
return isExHeader ? packetType == FLVVideoPacketType.codedFrames.rawValue ? 3 : 0 : 0
}

init() {
Expand Down
4 changes: 4 additions & 0 deletions Sources/RTMP/RTMPMuxer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ final class RTMPMuxer {
if let sampleBuffer = message.makeSampleBuffer(videoTimeStamp, formatDesciption: videoFormat) {
stream.mixer.videoIO.append(sampleBuffer)
}
case FLVVideoPacketType.codedFramesX.rawValue:
if let sampleBuffer = message.makeSampleBuffer(videoTimeStamp, formatDesciption: videoFormat) {
stream.mixer.videoIO.append(sampleBuffer)
}
default:
break
}
Expand Down

0 comments on commit bf0e8a5

Please sign in to comment.