Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiple pps #20

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.19

require (
github.com/Comcast/gots/v2 v2.2.1
github.com/Eyevinn/mp4ff v0.41.1-0.20240123164056-bbd4656aecc0
github.com/Eyevinn/mp4ff v0.42.0
github.com/asticode/go-astits v1.13.0
github.com/stretchr/testify v1.8.4
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/Comcast/gots/v2 v2.2.1 h1:LU/SRg7p2KQqVkNqInV7I4MOQKAqvWQP/PSSLtygP2s=
github.com/Comcast/gots/v2 v2.2.1/go.mod h1:firJ11on3eUiGHAhbY5cZNqG0OqhQ1+nSZHfsEEzVVU=
github.com/Eyevinn/mp4ff v0.41.1-0.20240123164056-bbd4656aecc0 h1:TVO5vjF4CEAB6OKR0RWMQFvHXtZ+UdKCsp+awECiIVE=
github.com/Eyevinn/mp4ff v0.41.1-0.20240123164056-bbd4656aecc0/go.mod h1:w/6GSa5ghZ1VavzJK6McQ2/flx8mKtcrKDr11SsEweA=
github.com/Eyevinn/mp4ff v0.42.0 h1:I85b/EDTkP77GsoBL8nRV6sfFKZhAXoP6oJHU8fv6kM=
github.com/Eyevinn/mp4ff v0.42.0/go.mod h1:w/6GSa5ghZ1VavzJK6McQ2/flx8mKtcrKDr11SsEweA=
github.com/asticode/go-astikit v0.30.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0=
github.com/asticode/go-astikit v0.42.0 h1:pnir/2KLUSr0527Tv908iAH6EGYYrYta132vvjXsH5w=
github.com/asticode/go-astikit v0.42.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0=
Expand Down
4 changes: 2 additions & 2 deletions internal/avc.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type AvcPS struct {
spss map[uint32]*avc.SPS
ppss map[uint32]*avc.PPS
spsnalu []byte
ppsnalus [][]byte
ppsnalus map[uint32][]byte
Statistics StreamStatistics
}

Expand All @@ -31,7 +31,7 @@ func (a *AvcPS) setSPS(nalu []byte) error {
if a.spss == nil {
a.spss = make(map[uint32]*avc.SPS, 1)
a.ppss = make(map[uint32]*avc.PPS, 1)
a.ppsnalus = make([][]byte, 1)
a.ppsnalus = make(map[uint32][]byte)
}
sps, err := avc.ParseSPSNALUnit(nalu, true)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/hevc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ type HevcPS struct {
ppss map[uint32]*hevc.PPS
vpsnalu []byte
spsnalu []byte
ppsnalus [][]byte
ppsnalus map[uint32][]byte
Statistics StreamStatistics
}

func (a *HevcPS) setSPS(nalu []byte) error {
if a.spss == nil {
a.spss = make(map[uint32]*hevc.SPS, 1)
a.ppss = make(map[uint32]*hevc.PPS, 1)
a.ppsnalus = make([][]byte, 1)
a.ppsnalus = make(map[uint32][]byte, 1)
}
sps, err := hevc.ParseSPSNALUnit(nalu)
if err != nil {
Expand Down
Loading