The QSV frame-pool 422 can name a control the editor is not rendering #848

Open
opened 2026-08-26 23:36:54 +02:00 by timothy · 0 comments
Owner

Split out of #735 (PR #847) as an accepted low-severity residual, with the review's own repro.

Repro

  1. Take a profile written before #529's floor existed that stores qsvExtraHardwareFrames = 0 (or any value below 64).
  2. Set its Hardware acceleration to something other than QSV — or copy it, since a copy is POSTed to the create handler where the legacy exemption deliberately does not apply.
  3. Save.

Observed: Save is disabled with QSV extra hardware frames must be at least 64, and FFmpegProfilesScreen.tsx renders that field only when hardwareAcceleration === 'Qsv' — so the message names a control that is not on screen. The operator has no hint that the workaround is "switch acceleration to QSV, fix the value, switch back".

Why the check is unconditional (do NOT re-gate it)

This is not a regression to undo by restoring the hardwareAcceleration === 'Qsv' gate in validate(). The server checks the field unconditionally, so with the gate the SPA let a draft through that the POST then 422'd anyway — the same dead end, one round trip later and further from the control. api.ffmpeg-profile-numeric-bounds records the rule: a conditionally-rendered field still needs its unconditional check. Re-gating would reopen that.

The reachability is unchanged by #735 — the create handler rejected this copy before too. What changed is that the rejection now happens in the form, which is why the missing control became visible.

Two candidate fixes (either, not both)

  • Render the field whenever the stored/draft value is out of range, regardless of acceleration — the control appears exactly when it is actionable, which is the smaller conceptual change.
  • Append the workaround to the message — "… — switch Hardware acceleration to QSV to change it". Cheaper, but leaves a form that names an absent control.

Prefer the first if it does not complicate the row's conditional (it currently shares a branch with the Tonemap algorithm row).

Done-when

  • Copying or re-saving a legacy sub-64 profile on a non-QSV acceleration either shows the control or names the workaround
  • The unconditional check in validate() is preserved (a test pins that it still fires for a non-QSV draft)
  • Adversarial review passed
Split out of #735 (PR #847) as an accepted low-severity residual, with the review's own repro. ## Repro 1. Take a profile written before #529's floor existed that stores `qsvExtraHardwareFrames = 0` (or any value below 64). 2. Set its **Hardware acceleration** to something other than QSV — or copy it, since a copy is POSTed to the create handler where the legacy exemption deliberately does not apply. 3. Save. **Observed:** Save is disabled with `QSV extra hardware frames must be at least 64`, and `FFmpegProfilesScreen.tsx` renders that field **only** when `hardwareAcceleration === 'Qsv'` — so the message names a control that is not on screen. The operator has no hint that the workaround is "switch acceleration to QSV, fix the value, switch back". ## Why the check is unconditional (do NOT re-gate it) This is not a regression to undo by restoring the `hardwareAcceleration === 'Qsv'` gate in `validate()`. The server checks the field unconditionally, so with the gate the SPA let a draft through that the `POST` then 422'd anyway — the same dead end, one round trip later and further from the control. `api.ffmpeg-profile-numeric-bounds` records the rule: *a conditionally-rendered field still needs its unconditional check*. Re-gating would reopen that. The reachability is unchanged by #735 — the create handler rejected this copy before too. What changed is that the rejection now happens in the form, which is why the missing control became visible. ## Two candidate fixes (either, not both) - **Render the field whenever the stored/draft value is out of range**, regardless of acceleration — the control appears exactly when it is actionable, which is the smaller conceptual change. - **Append the workaround to the message** — "… — switch Hardware acceleration to QSV to change it". Cheaper, but leaves a form that names an absent control. Prefer the first if it does not complicate the row's conditional (it currently shares a branch with the Tonemap algorithm row). ## Done-when - [ ] Copying or re-saving a legacy sub-64 profile on a non-QSV acceleration either shows the control or names the workaround - [ ] The unconditional check in `validate()` is preserved (a test pins that it still fires for a non-QSV draft) - [ ] Adversarial review passed
timothy added the bugfrontendpriority: low labels 2026-08-26 23:37:06 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: timothy/ersatztv#848