WritePacket method does not return error when the stream is not supported

This commit is contained in:
Sahin Kasap 2023-12-25 16:56:26 +03:00 committed by GitHub
parent eaab841cfb
commit a458f22ae3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,7 +172,8 @@ func (self *Muxer) WritePacket(pkt av.Packet) (err error) {
stream, ok := self.streams[int(pkt.Idx)]
if !ok {
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