switch to time.Duration
This commit is contained in:
parent
eb1fd52ef4
commit
b7dc09db2f
@ -936,11 +936,11 @@ func (self *Client) poll() (err error) {
|
|||||||
}
|
}
|
||||||
stream := self.streams[i]
|
stream := self.streams[i]
|
||||||
if stream.gotpkt {
|
if stream.gotpkt {
|
||||||
time := float64(stream.timestamp) / float64(stream.Sdp.TimeScale)
|
tm := time.Duration(stream.timestamp)*time.Second / time.Duration(stream.Sdp.TimeScale)
|
||||||
if false {
|
if false {
|
||||||
fmt.Printf("rtsp: #%d %d/%d %d\n", i, stream.timestamp, stream.Sdp.TimeScale, len(stream.pkt.Data))
|
fmt.Printf("rtsp: #%d %d/%d %d\n", i, stream.timestamp, stream.Sdp.TimeScale, len(stream.pkt.Data))
|
||||||
}
|
}
|
||||||
self.pktque.WriteTimePacket(self.setupMap[i], time, stream.pkt)
|
self.pktque.WriteTimePacket(self.setupMap[i], tm, stream.pkt)
|
||||||
stream.pkt = av.Packet{}
|
stream.pkt = av.Packet{}
|
||||||
stream.gotpkt = false
|
stream.gotpkt = false
|
||||||
return
|
return
|
||||||
|
@ -15,7 +15,7 @@ type Session struct {
|
|||||||
|
|
||||||
type Media struct {
|
type Media struct {
|
||||||
AVType string
|
AVType string
|
||||||
Type int
|
Type av.CodecType
|
||||||
TimeScale int
|
TimeScale int
|
||||||
Control string
|
Control string
|
||||||
Rtpmap int
|
Rtpmap int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user