mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 14:52:46 +08:00
examples: fix client-read-format-h264-save-to-disk example
This commit is contained in:
@@ -62,7 +62,8 @@ func main() {
|
||||
// called when a RTP packet arrives
|
||||
c.OnPacketRTP(medi, forma, func(pkt *rtp.Packet) {
|
||||
// convert RTP packets into NALUs
|
||||
nalus, pts, err := rtpDec.Decode(pkt)
|
||||
// DecodeUntilMarker is necessary for the DTS extractor to work
|
||||
nalus, pts, err := rtpDec.DecodeUntilMarker(pkt)
|
||||
if err != nil {
|
||||
if err != rtph264.ErrNonStartingPacketAndNoPrevious && err != rtph264.ErrMorePacketsNeeded {
|
||||
log.Printf("ERR: %v", err)
|
||||
|
Reference in New Issue
Block a user