log decode errors and lost packets by default (#380)

This commit is contained in:
Alessandro Ros
2023-08-25 16:08:28 +02:00
committed by GitHub
parent dec04ef9ac
commit 72aa55a012
2 changed files with 10 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ package gortsplib
import (
"context"
"fmt"
"log"
"net"
"strconv"
"strings"
@@ -256,6 +257,8 @@ func (ss *ServerSession) onPacketLost(err error) {
Session: ss,
Error: err,
})
} else {
log.Println(err.Error())
}
}
@@ -270,6 +273,8 @@ func (ss *ServerSession) onDecodeError(err error) {
Session: ss,
Error: err,
})
} else {
log.Println(err.Error())
}
}