Merge pull request #21 from DigitallyImported/validate-adts-aot

ATDS: add AOT validation
This commit is contained in:
nareix 2017-11-02 23:20:16 -05:00 committed by GitHub
commit bd41a3b90f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,6 +30,9 @@ func (self *Muxer) WriteHeader(streams []av.CodecData) (err error) {
return
}
self.config = streams[0].(aacparser.CodecData).Config
if self.config.ObjectType > aacparser.AOT_AAC_LTP {
err = fmt.Errorf("aac: AOT %d is not allowed in ADTS", self.config.ObjectType)
}
return
}