mirror of
https://github.com/lkmio/lkm.git
synced 2025-10-31 02:26:51 +08:00
修复rtmp音视频不同步问题
This commit is contained in:
@@ -36,14 +36,8 @@ func (t *transStream) Input(packet utils.AVPacket) error {
|
||||
var pts int64
|
||||
chunkHeaderSize := 12
|
||||
|
||||
if utils.AVCodecIdAAC == packet.CodecId() {
|
||||
dts = packet.ConvertDts(1024)
|
||||
pts = packet.ConvertPts(1024)
|
||||
} else {
|
||||
dts = packet.ConvertDts(1000)
|
||||
pts = packet.ConvertPts(1000)
|
||||
}
|
||||
|
||||
dts = packet.ConvertDts(1000)
|
||||
pts = packet.ConvertPts(1000)
|
||||
if dts >= 0xFFFFFF {
|
||||
chunkHeaderSize += 4
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user