mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Issue #2673 - Part 2b: Improve ADTS format sniffer's performance.
Also avoids false positives.
This commit is contained in:
parent
8f5a66b486
commit
8f52da3288
1 changed files with 4 additions and 0 deletions
|
|
@ -846,6 +846,10 @@ ADTSDemuxer::ADTSSniffer(const uint8_t* aData, const uint32_t aLength)
|
|||
if (aLength < 7) {
|
||||
return false;
|
||||
}
|
||||
// Avoid seeking if blob doesn't start with an ADTS marker.
|
||||
if (!adts::FrameHeader::MatchesSync(aData)) {
|
||||
return false;
|
||||
}
|
||||
auto parser = MakeUnique<adts::FrameParser>();
|
||||
|
||||
if (!parser->Parse(0, aData, aData + aLength)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue