test fast push

This commit is contained in:
deepch 2022-03-14 01:28:42 +03:00
parent 1f0d31fcfb
commit 9b5af91694

View File

@ -226,7 +226,7 @@ func (element *Muxer) WritePacket(pkt av.Packet) (err error) {
codec := tmp.codec.(h264parser.CodecData)
err = tmp.track.WriteSample(media.Sample{Data: append([]byte{0, 0, 0, 1}, bytes.Join([][]byte{codec.SPS(), codec.PPS(), nalu}, []byte{0, 0, 0, 1})...), Duration: pkt.Duration})
} else {
} else if naltype == 1 {
err = tmp.track.WriteSample(media.Sample{Data: append([]byte{0, 0, 0, 1}, nalu...), Duration: pkt.Duration})
}
if err != nil {