mirror of https://bitbucket.org/ausocean/av.git
stream/mts: fixed what encoder is doing with Write methods int return
This commit is contained in:
parent
61d70dc9a6
commit
89ba74004a
|
@ -220,9 +220,9 @@ func (e *Encoder) Write(nalu []byte) (int, error) {
|
|||
pkt.PCR = e.pcr()
|
||||
pusi = false
|
||||
}
|
||||
n, err := e.dst.Write(pkt.Bytes(e.tsSpace[:PacketSize]))
|
||||
_, err := e.dst.Write(pkt.Bytes(e.tsSpace[:PacketSize]))
|
||||
if err != nil {
|
||||
return n, err
|
||||
return len(nalu), err
|
||||
}
|
||||
e.pktCount++
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue