Repository navigation
Description
What happened?
I called setAudioShaping(_:) while playback was paused. I expected the session-preserving rebuild at the playhead to show the paused frame again and republish hasFirstFrameReadyForDisplay = true, as the setAudioShaping docs describe ("about 0.3 s of held picture with the position preserved").
Instead, the rebuild finishes (AE#923: rebuilt at the playhead with audio shaping …) but stops at #361 startup 7/8 ready: there is no 8/8 presenting, the video renderer goes to readyForDisplay = NO and never back to YES, and hasFirstFrameReadyForDisplay stays false for as long as the session stays paused.
A host that follows the documented contract (cover and "picture ready" UI gated on $hasFirstFrameReadyForDisplay) then treats the paused session as having no picture: a waiting spinner, hidden transport controls, no scrubbing, no track menu, until play().
Steps to reproduce
engine.load(url:options:)on the file below with defaultLoadOptions(no audio shaping), let it play, thenpause().state == .paused,hasFirstFrameReadyForDisplay == true.engine.setAudioShaping(AudioShaping(dialogueGainDB: 6)).- About 0.2 s later,
engine.setAudioShaping(AudioShaping()). - Observe
$hasFirstFrameReadyForDisplay: it goesfalseat the first rebuild and staysfalsewhile paused. Both rebuilds logstartup 7/8 readyand no8/8 presenting.
The same steps while playing are fine. Not checked: whether a single paused setAudioShaping call (no second call) or a paused setAudioDelay(_:) behaves the same; both go through reloadAtCurrentPosition().
AetherEngine version or commit SHA
7.54.0 (ee5027c). I didn't see a related fix in the 7.55.0 or 7.56.0 notes.
Host app
Custom / my own integration
Platform
tvOS
OS version
tvOS 27.2 (Simulator)
Device / chip
Apple TV 4K (3rd generation) Simulator on an Apple silicon Mac
Playback path
Software (dav1d) host
Source media (for playback bugs)
MKV, H.264 8-bit 4:2:0 (libx264), 1920x1080, 24 fps, SDR; AAC-LC stereo 48 kHz. 6 minutes, about 22 MB. Served over plain HTTP with byte ranges (seekable). The session runs on the software host because the simulator's VideoToolbox doesn't decode this stream ("codec=27 not hardware-decodable by VideoToolbox; routing to the software path").
Error codes / log lines
[AetherEngine] #361 startup 8/8 presenting (gen 1) <- first load, normal
... pause() ...
[AetherEngine] #361 startup 0/8 dispatched (gen 2)
<<<< AVSampleBufferVideoRenderer >>>> setting readyForDisplay to NO
<<<< FigVideoQueue >>>> signalled err=-12080
[SWHost] audio: AE#923 shaping (dialogue +6.0 dB) keeps the track on the PCM decode
[AetherEngine] AE#923: audio shaping applied (dialogue +6.0 dB)
[AetherEngine] #361 startup 7/8 ready (gen 2)
[AetherEngine] AE#923: rebuilt at the playhead with audio shaping dialogue +6.0 dB
<<<< FigVideoQueue >>>> signalled err=-12783
[AetherEngine] AE#923: audio shaping off (off)
[AetherEngine] #361 startup 0/8 dispatched (gen 3)
<<<< AVSampleBufferVideoRenderer >>>> setting readyForDisplay to NO
[AetherEngine] #361 startup 7/8 ready (gen 3)
[AetherEngine] AE#923: rebuilt at the playhead with audio shaping off
(no "8/8 presenting" for gen 2 or gen 3, no "readyForDisplay to YES" while paused)
Anything else
The rebuild resumes paused as intended (setLoadedAutoplay(sessionRebuildResumesPlaying); the audio renderer is set to rate 0), so the question is only the frame: a paused rebuild doesn't seem to decode and enqueue the frame at the playhead. The host is not compensating for this; it waits for the engine's signal.
Activity
superuser404notfound commentedon Nov 3, 2026
Thanks for the precise report, the log lines pointed straight at it.
Cause. The software host only started its demux and decode loops in
play(). A load withautoplay = falsenever touched the host after loading, and a rebuild of a paused session (setAudioShaping,setAudioDelay,reloadAtCurrentPosition) mounts paused through that same path. So in all three cases nothing was decoded, and the ladder stopped atstartup 7/8 readyuntil the nextplay(). The native path was not affected.Fix (
7ba20e66, merged to main in0821e958, not in a release yet). A paused mount now pauses the host. When a host is loaded but has never played, a pause starts the loops under the existing hold for a pause before the first frame: the clock stays stopped, the frame at the playhead is decoded and presented, and the loops park again.Checked with
aetherctl play --sw --pausedplus two paused--switch-audio-shapingcalls 200 ms apart, on a 1080p H.264 MKV with AAC:rfd=nfor the whole run, no8/8 presentingfor any generation8/8 presentingfor the mount and for both rebuilds,state=paused, and the clock does not move (also with a 20 s start position)Pause at start then
play(), shaping while playing, and paused mount then play all behave as before. Full suite is green, and there is a new regression test inIssue973PausedLoadFirstFrameTests.This also covers your two unchecked cases. A single paused
setAudioShapingand a pausedsetAudioDelaygo through the same rebuild, so they had the same problem and get the same fix.I'll leave the issue open until a release ships it and you've retested.
superuser404notfound commentedon Nov 5, 2026
Released in 7.57.0 (
7d50497): a paused software session, aftersetAudioShaping,setAudioDelay,reloadAtCurrentPositionor a load withautoplay = false, presents its frame again. A retest on that build would confirm it on the reporting setup.chore(engine): integrate upstream 7.57.0
secunit404 commentedon Nov 5, 2026
Confirmed fixed on 7.57.0. With playback paused,
setAudioShapingnow rebuilds and presents a frame on the software host, andhasFirstFrameReadyForDisplayturns true without callingplay(). Tested in the tvOS simulator. Thanks for the quick fix. Fine to close from my side.