Skip to content

Commit d5e07a1

Browse files
xdrudisedaniels
authored andcommitted
Restore relative timestamp
1 parent 04b4621 commit d5e07a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/media/ivfwriter/ivfwriter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func (i *IVFWriter) WriteRTP(packet *rtp.Packet) error {
145145
if i.count == 0 {
146146
i.firstFrameTimestamp = packet.Header.Timestamp
147147
}
148-
relativeTstampMs := 1000 * uint64(packet.Header.Timestamp) / i.clockRate
148+
relativeTstampMs := 1000 * uint64(packet.Header.Timestamp-i.firstFrameTimestamp) / i.clockRate
149149

150150
if i.isVP8 {
151151
vp8Packet := codecs.VP8Packet{}

0 commit comments

Comments
 (0)