mirror of
https://github.com/aler9/gortsplib
synced 2025-10-30 18:16:29 +08:00
prevent decoders from returning empty NALUs (bluenviron/mediamtx#4346) (#726)
This commit is contained in:
@@ -60,6 +60,12 @@ func (d *Decoder) decodeOBUs(pkt *rtp.Packet) ([][]byte, error) {
|
||||
return nil, fmt.Errorf("invalid header: %w", err)
|
||||
}
|
||||
|
||||
for _, obu := range av1header.OBUElements {
|
||||
if len(obu) == 0 {
|
||||
return nil, fmt.Errorf("invalid OBU size")
|
||||
}
|
||||
}
|
||||
|
||||
if av1header.Z {
|
||||
if d.fragmentsSize == 0 {
|
||||
if !d.firstPacketReceived {
|
||||
|
||||
Reference in New Issue
Block a user