@ahmedrowaihi/mediabunny 1.65.2-beta.581 → 1.65.2-beta.583

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.
@@ -9651,7 +9651,7 @@ var Mediabunny = (() => {
9651
9651
  this.currentTrack = track;
9652
9652
  track.currentFragmentState = {
9653
9653
  baseDataOffset: this.currentFragment.implicitBaseDataOffset,
9654
- baseIsImplicit: true,
9654
+ implicitBaseShift: this.currentFragment.moofOffset - this.currentFragment.implicitBaseDataOffset,
9655
9655
  sampleDescriptionIndex: defaults?.defaultSampleDescriptionIndex ?? null,
9656
9656
  defaultSampleDuration: defaults?.defaultSampleDuration ?? null,
9657
9657
  defaultSampleSize: defaults?.defaultSampleSize ?? null,
@@ -9661,10 +9661,10 @@ var Mediabunny = (() => {
9661
9661
  };
9662
9662
  if (baseDataOffsetPresent) {
9663
9663
  track.currentFragmentState.baseDataOffset = readU64Be(slice);
9664
- track.currentFragmentState.baseIsImplicit = false;
9664
+ track.currentFragmentState.implicitBaseShift = null;
9665
9665
  } else if (defaultBaseIsMoof) {
9666
9666
  track.currentFragmentState.baseDataOffset = this.currentFragment.moofOffset;
9667
- track.currentFragmentState.baseIsImplicit = false;
9667
+ track.currentFragmentState.implicitBaseShift = null;
9668
9668
  }
9669
9669
  if (sampleDescriptionIndexPresent) {
9670
9670
  track.currentFragmentState.sampleDescriptionIndex = readU32Be(slice);
@@ -9741,7 +9741,7 @@ var Mediabunny = (() => {
9741
9741
  track,
9742
9742
  currentTimestamp: 0,
9743
9743
  currentOffset: track.currentFragmentState.baseDataOffset + (dataOffset ?? 0),
9744
- implicitBaseShift: track.currentFragmentState.baseIsImplicit && track.currentFragmentState.baseDataOffset !== this.currentFragment.moofOffset ? this.currentFragment.moofOffset - track.currentFragmentState.baseDataOffset : null,
9744
+ implicitBaseShift: track.currentFragmentState.implicitBaseShift || null,
9745
9745
  startTimestamp: 0,
9746
9746
  endTimestamp: 0,
9747
9747
  firstKeyFrameTimestamp: null,