improve examples

This commit is contained in:
aler9
2023-01-07 11:46:00 +01:00
parent bf12e12afd
commit 441a90a519
26 changed files with 85 additions and 85 deletions

View File

@@ -67,7 +67,7 @@ func main() {
h264RawDec.decode(pps)
}
// setup the chosen media only
// setup a single media
_, err = c.Setup(medi, baseURL, 0, 0)
if err != nil {
panic(err)
@@ -75,7 +75,7 @@ func main() {
// called when a RTP packet arrives
c.OnPacketRTP(medi, forma, func(pkt *rtp.Packet) {
// convert RTP packets into NALUs
// extract NALUs from RTP packets
nalus, pts, err := rtpDec.Decode(pkt)
if err != nil {
if err != rtph264.ErrNonStartingPacketAndNoPrevious && err != rtph264.ErrMorePacketsNeeded {