You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Linux, the editor preview goes blank with "preview unavailable on this machine — decode_at(frame_idx=…) : aucune frame reçue" when playback or scrubbing needs a frame at or past the last frame of a recording.
The cause is decoder-side, in the Linux software decoder's seek path (crates/compositor/src/linux_decode.rs, SwDecoder::decode_at, reached from the preview player via live.rs → pipeline_linux::Decoder::seek_to). For a target timestamp at/after the last frame, av_seek_frame(…, AVSEEK_FLAG_BACKWARD) succeeds but lands on a single undecodable packet just before EOF; after avcodec_flush_buffers that reference-less packet yields no frame even when drained, so decode_at bails with "aucune frame reçue" instead of returning the last available frame.
It shows up most on frame-dropped recordings whose real avg_frame_rate is below the nominal 60 fps: a frame index computed on the 60 fps grid then points past the file's true frame count. Measured on a real recording: 631 frames / 11.2 s (≈56.34 fps) — sweeping decode_at over indices decodes 0..=630 fine and fails for every index ≥ 631. Those sub-60fps files are themselves produced by the capture-side bug #511.
Expected behavior
Seeking to or past the end of a clip returns the last available frame and the preview never errors — a requested frame index beyond the last frame should clamp to the last frame.
Fix approach (in progress): when the backward-seek decode yields no frame, rewind to 0 and forward-scan, returning the last frame ≤ target (the same linear fallback already used for unindexed WebM). The accompanying PR also folds in two related latent decode_at seek-path hardening changes — draining the decoder at EOF (needed for B-frame streams; inert on these H.264-baseline has_b_frames=0 captures) and fixing an AVERROR_INVALIDDATA guard that compared against the wrong constant (-0x2A2A2A2A).
Describe the bug
On Linux, the editor preview goes blank with "preview unavailable on this machine —
decode_at(frame_idx=…) : aucune frame reçue" when playback or scrubbing needs a frame at or past the last frame of a recording.The cause is decoder-side, in the Linux software decoder's seek path (
crates/compositor/src/linux_decode.rs,SwDecoder::decode_at, reached from the preview player vialive.rs→pipeline_linux::Decoder::seek_to). For a target timestamp at/after the last frame,av_seek_frame(…, AVSEEK_FLAG_BACKWARD)succeeds but lands on a single undecodable packet just before EOF; afteravcodec_flush_buffersthat reference-less packet yields no frame even when drained, sodecode_atbails with "aucune frame reçue" instead of returning the last available frame.It shows up most on frame-dropped recordings whose real
avg_frame_rateis below the nominal 60 fps: a frame index computed on the 60 fps grid then points past the file's true frame count. Measured on a real recording: 631 frames / 11.2 s (≈56.34 fps) — sweepingdecode_atover indices decodes0..=630fine and fails for every index ≥ 631. Those sub-60fps files are themselves produced by the capture-side bug #511.Expected behavior
Seeking to or past the end of a clip returns the last available frame and the preview never errors — a requested frame index beyond the last frame should clamp to the last frame.
To Reproduce
ffprobe -select_streams v:0 -show_entries stream=avg_frame_rate,nb_frames,duration <file>.mp4).decode_at(frame_idx=…) : aucune frame reçue".Decoder-level repro (no UI): open the file with
SwDecoderand calldecode_at(idx)foridxin0..=nb_frames + 30; every index>= nb_framesfails.OS
Linux
OS Version
Arch Linux (kernel 7.1.9)
Additional context
crates/compositor/src/linux_decode.rs(SwDecoder::decode_at).decode_atseek-path hardening changes — draining the decoder at EOF (needed for B-frame streams; inert on these H.264-baselinehas_b_frames=0captures) and fixing anAVERROR_INVALIDDATAguard that compared against the wrong constant (-0x2A2A2A2A).