mediabunny 1.24.3 → 1.24.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -45,12 +45,16 @@ Mediabunny is a JavaScript library for reading, writing, and converting media fi
45
45
 
46
46
  <div align="center">
47
47
  <a href="https://www.reactvideoeditor.com/" target="_blank" rel="sponsored">
48
- <img src="./docs/public/sponsors/rve.svg" width="40" height="40" alt="React Video Editor">
48
+ <img src="./docs/public/sponsors/rve.png" width="40" height="40" alt="React Video Editor">
49
49
  </a>
50
50
  &nbsp;&nbsp;&nbsp;&nbsp;
51
51
  <a href="https://www.mux.com/" target="_blank" rel="sponsored">
52
52
  <img src="./docs/public/sponsors/mux.jpg" width="40" height="40" alt="Mux">
53
53
  </a>
54
+ &nbsp;&nbsp;&nbsp;&nbsp;
55
+ <a href="https://jellypod.ai/" target="_blank" rel="sponsored">
56
+ <img src="./docs/public/sponsors/jellypod.png" width="40" height="40" alt="Jellypod">
57
+ </a>
54
58
  </div>
55
59
 
56
60
  [Sponsor Mediabunny's development](https://github.com/sponsors/Vanilagy)
@@ -14387,14 +14387,25 @@ var Mediabunny = (() => {
14387
14387
  }
14388
14388
  slice.skip(-2);
14389
14389
  const lengthIfNextFlacFrameHeaderIsLegit = slice.filePos - startPos;
14390
- const nextIsLegit = this.readFlacFrameHeader({
14390
+ const nextFrameHeader = this.readFlacFrameHeader({
14391
14391
  slice,
14392
14392
  isFirstPacket: false
14393
14393
  });
14394
- if (!nextIsLegit) {
14394
+ if (!nextFrameHeader) {
14395
14395
  slice.skip(-1);
14396
14396
  continue;
14397
14397
  }
14398
+ if (this.blockingBit === 0) {
14399
+ if (nextFrameHeader.num - frameHeader.num !== 1) {
14400
+ slice.skip(-1);
14401
+ continue;
14402
+ }
14403
+ } else {
14404
+ if (nextFrameHeader.num - frameHeader.num !== frameHeader.blockSize) {
14405
+ slice.skip(-1);
14406
+ continue;
14407
+ }
14408
+ }
14398
14409
  return {
14399
14410
  num: frameHeader.num,
14400
14411
  blockSize: frameHeader.blockSize,
@@ -14459,6 +14470,9 @@ var Mediabunny = (() => {
14459
14470
  if (sampleRate === null) {
14460
14471
  return null;
14461
14472
  }
14473
+ if (sampleRate !== this.audioInfo.sampleRate) {
14474
+ return null;
14475
+ }
14462
14476
  const size = slice.filePos - startOffset;
14463
14477
  const crc = readU8(slice);
14464
14478
  slice.skip(-size);