mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
update mediacommon (#332)
This commit is contained in:
@@ -51,7 +51,7 @@ Features:
|
||||
* [API Documentation](#api-documentation)
|
||||
* [RTP Payload Formats](#rtp-payload-formats)
|
||||
* [Standards](#standards)
|
||||
* [Links](#links)
|
||||
* [Related projects](#related-projects)
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -152,11 +152,11 @@ In RTSP, media streams are routed between server and clients by using RTP packet
|
||||
* [Codec standards](https://github.com/bluenviron/mediacommon#standards)
|
||||
* [Golang project layout](https://github.com/golang-standards/project-layout)
|
||||
|
||||
## Links
|
||||
|
||||
Related projects
|
||||
## Related projects
|
||||
|
||||
* [MediaMTX](https://github.com/bluenviron/mediamtx)
|
||||
* [gohlslib](https://github.com/bluenviron/gohlslib)
|
||||
* [mediacommon](https://github.com/bluenviron/mediacommon)
|
||||
* [pion/sdp (SDP library used internally)](https://github.com/pion/sdp)
|
||||
* [pion/rtp (RTP library used internally)](https://github.com/pion/rtp)
|
||||
* [pion/rtcp (RTCP library used internally)](https://github.com/pion/rtcp)
|
||||
|
2
go.mod
2
go.mod
@@ -4,7 +4,7 @@ go 1.18
|
||||
|
||||
require (
|
||||
github.com/asticode/go-astits v1.11.0
|
||||
github.com/bluenviron/mediacommon v0.6.0
|
||||
github.com/bluenviron/mediacommon v0.7.0
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/pion/rtcp v1.2.10
|
||||
github.com/pion/rtp v1.8.0
|
||||
|
4
go.sum
4
go.sum
@@ -2,8 +2,8 @@ github.com/asticode/go-astikit v0.30.0 h1:DkBkRQRIxYcknlaU7W7ksNfn4gMFsB0tqMJflx
|
||||
github.com/asticode/go-astikit v0.30.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0=
|
||||
github.com/asticode/go-astits v1.11.0 h1:GTHUXht0ZXAJXsVbsLIcyfHr1Bchi4QQwMARw2ZWAng=
|
||||
github.com/asticode/go-astits v1.11.0/go.mod h1:QSHmknZ51pf6KJdHKZHJTLlMegIrhega3LPWz3ND/iI=
|
||||
github.com/bluenviron/mediacommon v0.6.0 h1:suWFWHL9WL+sfBQPmleCd5jCY0iEtuKgvPRUaBGoq+g=
|
||||
github.com/bluenviron/mediacommon v0.6.0/go.mod h1:wuLJdxcITiSPgY1MvQqrX+qPlKmNfeV9wNvXth5M98I=
|
||||
github.com/bluenviron/mediacommon v0.7.0 h1:dJWLLL9oDbAqfK8KuNfnDUQwNbeMAtGeRjZc9Vo95js=
|
||||
github.com/bluenviron/mediacommon v0.7.0/go.mod h1:wuLJdxcITiSPgY1MvQqrX+qPlKmNfeV9wNvXth5M98I=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
@@ -178,11 +178,11 @@ func (d *Decoder) DecodeUntilMarker(pkt *rtp.Packet) ([][]byte, time.Duration, e
|
||||
}
|
||||
l := len(nalus)
|
||||
|
||||
if (d.frameBufferLen + l) > h264.MaxNALUsPerGroup {
|
||||
if (d.frameBufferLen + l) > h264.MaxNALUsPerAccessUnit {
|
||||
d.frameBuffer = nil
|
||||
d.frameBufferLen = 0
|
||||
return nil, 0, fmt.Errorf("NALU count exceeds maximum allowed (%d)",
|
||||
h264.MaxNALUsPerGroup)
|
||||
h264.MaxNALUsPerAccessUnit)
|
||||
}
|
||||
|
||||
d.frameBuffer = append(d.frameBuffer, nalus...)
|
||||
|
@@ -190,7 +190,7 @@ func TestDecoderErrorLimit(t *testing.T) {
|
||||
d.Init()
|
||||
var err error
|
||||
|
||||
for i := 0; i <= h264.MaxNALUsPerGroup; i++ {
|
||||
for i := 0; i <= h264.MaxNALUsPerAccessUnit; i++ {
|
||||
_, _, err = d.DecodeUntilMarker(&rtp.Packet{
|
||||
Header: rtp.Header{
|
||||
Version: 2,
|
||||
|
@@ -170,11 +170,11 @@ func (d *Decoder) DecodeUntilMarker(pkt *rtp.Packet) ([][]byte, time.Duration, e
|
||||
}
|
||||
l := len(nalus)
|
||||
|
||||
if (d.frameBufferLen + l) > h265.MaxNALUsPerGroup {
|
||||
if (d.frameBufferLen + l) > h265.MaxNALUsPerAccessUnit {
|
||||
d.frameBuffer = nil
|
||||
d.frameBufferLen = 0
|
||||
return nil, 0, fmt.Errorf("NALU count exceeds maximum allowed (%d)",
|
||||
h265.MaxNALUsPerGroup)
|
||||
h265.MaxNALUsPerAccessUnit)
|
||||
}
|
||||
|
||||
d.frameBuffer = append(d.frameBuffer, nalus...)
|
||||
|
@@ -42,7 +42,7 @@ func TestDecoderErrorLimit(t *testing.T) {
|
||||
d.Init()
|
||||
var err error
|
||||
|
||||
for i := 0; i <= h265.MaxNALUsPerGroup; i++ {
|
||||
for i := 0; i <= h265.MaxNALUsPerAccessUnit; i++ {
|
||||
_, _, err = d.DecodeUntilMarker(&rtp.Packet{
|
||||
Header: rtp.Header{
|
||||
Version: 2,
|
||||
|
Reference in New Issue
Block a user