fix muxer cts bug
This commit is contained in:
parent
dd4452fb65
commit
902c647841
6
muxer.go
6
muxer.go
@ -100,10 +100,8 @@ func (self *Muxer) WritePacket(streamIndex int, pkt av.Packet) (err error) {
|
|||||||
buf := &bytes.Buffer{}
|
buf := &bytes.Buffer{}
|
||||||
pes := PESHeader{
|
pes := PESHeader{
|
||||||
StreamId: StreamIdH264,
|
StreamId: StreamIdH264,
|
||||||
PTS: timeToPesTs(stream.time),
|
PTS: timeToPesTs(stream.time + pkt.CompositionTime),
|
||||||
}
|
DTS: timeToPesTs(stream.time),
|
||||||
if pkt.CompositionTime > 0.0 {
|
|
||||||
pes.DTS = timeToPesTs(stream.time + pkt.CompositionTime)
|
|
||||||
}
|
}
|
||||||
WritePESHeader(buf, pes, 0)
|
WritePESHeader(buf, pes, 0)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user