WritePacket method does not return error when the stream is not supported
This commit is contained in:
parent
eaab841cfb
commit
a458f22ae3
@ -172,7 +172,8 @@ func (self *Muxer) WritePacket(pkt av.Packet) (err error) {
|
|||||||
stream, ok := self.streams[int(pkt.Idx)]
|
stream, ok := self.streams[int(pkt.Idx)]
|
||||||
if !ok {
|
if !ok {
|
||||||
fmt.Printf("Warning, unsupported stream index: %d\n", pkt.Idx)
|
fmt.Printf("Warning, unsupported stream index: %d\n", pkt.Idx)
|
||||||
return
|
err = fmt.Errorf("Warning, unsupported stream index: %d", pkt.Idx)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
pkt.Time += time.Second
|
pkt.Time += time.Second
|
||||||
|
Loading…
Reference in New Issue
Block a user