Skip to content

Seek timing calculation occasionally uses stale reference from the previous seek, in one case triggering a false "audio lead exhausted" rebuffer pause #491

Description

@classicjazz

What happened?

Twice, a seek's landing diagnostics compute a delta value whose magnitude closely matches the distance to the previous seek's target rather than a normal frame-to-frame or lead value:

  • Cosmetic case (FileB, seek#6, target=1111.34s, preceded by seek#5 target=949.74s — gap 161.60s): dpts=41.0/159367.0 (159.367s) appears in a single SWDiag sample, in a file otherwise showing dpts=41.0/42.0 throughout. No visible playback impact — it self-corrects on the next sample.
  • Severe case (FileI, seek#5, target=1898.06s, preceded by seek#4 target=1453.92s — gap 444.14s): vLead reads -443.36, and the engine's own audio-lead check trips:
    [SWHost] audio lead exhausted (-440.08s); pausing clock for rebuffer
    [AudioOutput] pause at t=1898.899
    
    This forces an actual, unwanted playback pause. The next sample shows dpts=16.5/442842.5 (442.84s) and layerDrop jumps by 33 in that single interval — the largest single-step drop count seen in any session tested.

Steps to reproduce

  1. Open a VC-1 file (reproduces on both a progressive file, FileB, and an interlaced file, FileI, so it isn't deinterlace-specific).
  2. Perform a sequence of programmatic seeks to varied, non-adjacent timestamps.
  3. Watch for a SWDiag sample whose dpts or vLead magnitude is on the order of hundreds of seconds — in the FileI case this crossed the internal rebuffer threshold and produced a visible pause; in the FileB case it stayed under threshold and was only visible in diagnostics.

AetherEngine version or commit SHA

6.68.0

Host app

AetherPlayer

Platform

macOS

OS version

Mac OS 27

Device / chip

M1 Max Mac Studio

Playback path

Software (dav1d) host

Source media (for playback bugs)

No response

Error codes / log lines


Anything else

In both cases the anomalous magnitude is very close to the gap between the current seek's target and the immediately preceding seek's target (161.6s vs. 159.4s reported; 444.1s vs. 442.8s/443.4s reported) — not the seek's actual jump-from-playhead distance, and not a value that appears in any other seek in these sessions. That strongly suggests some piece of seek-landing bookkeeping (the per-frame timestamp window, and/or the audio-lead reference used by SWHost) is occasionally not resetting to the new seek's landing point and is instead diffing against a stale value left over from the prior seek. Because this fed into the audio-lead-exhaustion check in the FileI case, it's a real, user-visible defect (an unexpected pause during normal seeking), not just a diagnostic artifact — worth prioritizing over the FileB case even though that one is more benign. I don't have source access to confirm the exact mechanism, so this is offered as a strong correlational pattern for someone with access to SWHost's seek-landing code to investigate, not a confirmed root cause.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions