mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Refactor] Use collection expressions.
This commit is contained in:
@@ -131,17 +131,13 @@ public class Mpeg
|
||||
|
||||
#endregion
|
||||
|
||||
static readonly byte[] _mpeg2PackHeaderStartCode =
|
||||
{
|
||||
0x0, 0x0, 0x1
|
||||
};
|
||||
static readonly byte[] _mpeg2PackHeaderStartCode = [0x0, 0x0, 0x1];
|
||||
|
||||
public static bool ContainsMpegPackets(byte[] sectorData, uint blocks = 1, uint blockSize = 2048)
|
||||
{
|
||||
for(uint i = 0; i < blocks; i++)
|
||||
{
|
||||
if(IsMpegPacket(sectorData.Skip((int)(i * blockSize)))) return true;
|
||||
}
|
||||
if(IsMpegPacket(sectorData.Skip((int)(i * blockSize))))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user