mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-21 22:57:31 +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) {
|
if (aLength < 7) {
|
||||||
return false;
|
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>();
|
auto parser = MakeUnique<adts::FrameParser>();
|
||||||
|
|
||||||
if (!parser->Parse(0, aData, aData + aLength)) {
|
if (!parser->Parse(0, aData, aData + aLength)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue