Skip to content

Commit

Permalink
muxer: prevent invalid AV1 sequence headers from being written (bluen…
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 committed Jan 19, 2025
1 parent 62e427b commit 9a4f9a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions muxer_segmenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ func (s *muxerSegmenter) writeAV1(
if h.Type == av1.OBUTypeSequenceHeader {
randomAccess = true

if h.HasSize {
return fmt.Errorf("the size field must be stripped from AV1 OBUs before writing")
}

if !bytes.Equal(codec.SequenceHeader, obu) {
s.pendingParamsChange = true
codec.SequenceHeader = obu
Expand Down

0 comments on commit 9a4f9a6

Please sign in to comment.