Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo4405 committed Feb 3, 2018
1 parent f6aaec4 commit f8c80fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/RTMP/RTMPMuxer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ extension RTMPMuxer: VideoEncoderDelegate {
} else {
compositionTime = Int32((decodeTimeStamp.seconds - decodeTimeStamp.seconds) * 1000)
}
let delta: Double = (videoTimestamp == kCMTimeZero ? 0 : decodeTimeStamp.seconds - videoTimestamp.seconds) * 1000
guard let data: Data = sampleBuffer.dataBuffer?.data, 0 <= delta else {
return
}
let delta: Double = (videoTimestamp == kCMTimeZero ? 0 : decodeTimeStamp.seconds - videoTimestamp.seconds) * 1000
var buffer: Data = Data([((keyframe ? FLVFrameType.key.rawValue : FLVFrameType.inter.rawValue) << 4) | FLVVideoCodec.avc.rawValue, FLVAVCPacketType.nal.rawValue])
buffer.append(contentsOf: compositionTime.bigEndian.data[1..<4])
buffer.append(data)
Expand Down

0 comments on commit f8c80fa

Please sign in to comment.