Skip to content

Commit

Permalink
update mediacommon (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored Jul 27, 2023
1 parent 1249dc9 commit 053cd9b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Features:
* [API Documentation](#api-documentation)
* [RTP Payload Formats](#rtp-payload-formats)
* [Standards](#standards)
* [Links](#links)
* [Related projects](#related-projects)

## Examples

Expand Down Expand Up @@ -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 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
4 changes: 2 additions & 2 deletions pkg/formats/rtph264/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down
2 changes: 1 addition & 1 deletion pkg/formats/rtph264/decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions pkg/formats/rtph265/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down
2 changes: 1 addition & 1 deletion pkg/formats/rtph265/decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 053cd9b

Please sign in to comment.