bluenviron / gortsplib

RTSP 1.0 client and server library for the Go programming language
MIT License
674 stars 185 forks source link

Decode AAC return error when AU data length is zero #544

Closed BenLocal closed 4 months ago

BenLocal commented 5 months ago

try fix https://github.com/bluenviron/gortsplib/issues/542

aler9 commented 4 months ago

Hello, although a blank access unit is surely an invalid unit, the RTP decoder is not in charge of validating incoming access units. Checks inside the RTP decoder are meant to avoid panics and OOM situations. Adding additional checks would decrease performance and would not be enough anyway to guarantee the validity of the unit.

Checks on the content of access units are already performed by codec-specific decoders or interpreters, during decoding or parsing.