Skip to content

Turning off every output type with Apply while a recording is pending leaves the filter restarting every tick without releasing it #194

Description

@hanatyan128

Summary

When a stream recording is pending because its source is not available, and an Apply turns off every output type, the filter neither stops nor restarts its outputs. The interval timer logs Settings change detected, Attempting restart on every tick, and the pending recording and the infrastructure (private view, encoders, audio captures) stay allocated.

  • The state does not clear when the source's resolution comes back.
  • It clears only when something else stops the pending recording (see Cause).

Affected version

Conditions

  • "Suspend recording when source is not available" is on.
  • The recording is pending without a recording output (recordingPending is true and recordingActive is false), and no streaming slot or replay buffer is running.
    • This happens when the recording starts while the parent source reports 0x0: the infrastructure is built at the canvas size and the recording output is not created (plugin-stream-recording.cpp#L483-L489).
  • An Apply turns off Streaming, Stream Recording and Replay Buffer.

Steps to reproduce

  1. Add a Branch Output filter to a source that reports 0x0, such as an Image source with no file selected. Enable only Stream Recording, turn on "Suspend recording when source is not available", and set the interlock to "Always ON".
    • The log shows The recording output pending until source is uncollapsed.
  2. Open the filter properties, turn off Stream Recording, and click Apply.
  3. Select an image file for the source.

Expected result, as derived from the code:

  • After step 2, Settings change detected, Attempting restart is logged every second.
  • Step 3 does not change this, and no recording starts.

Cause

  • restartOutput() stops the outputs only when a streaming slot, the recording or the replay buffer is active; a pending recording does not count. It starts them only when some output type is enabled in the applied settings (plugin-main.cpp#L836-L846). With a pending recording and every type turned off, it does neither.
  • Nothing rebuilds the infrastructure, so activeSettings keeps the old snapshot (#L333) and every later tick detects the same change (#L1165-L1180).
  • The restart check returns before the block that resumes a pending recording when the source comes back (#L1272-L1289), and also before the blanking update and the source monitoring that follow it.

The state clears only when one of these happens:

  • The recording's dock toggle is turned off. The per-output toggle stop clears the pending recording and releases the infrastructure (#L1146).
  • An Apply enables any output type again. restartOutput() then reaches startOutput(), whose stopOutput() clears the pending recording.
  • The interlock condition stops holding (modes other than "Individual"), or, in "Individual", OBS recording stops (#L1102).
  • The filter is disabled.

Suggested fix

  • Include recordingPending in the stop condition of restartOutput(), or call stopOutput() there unconditionally. stopOutput() clears the pending recording and releases the infrastructure when no output is running.

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions