Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libobs: Fix missing started signal upon second start of delayed output #10653

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tt2468
Copy link
Member

@tt2468 tt2468 commented May 8, 2024

Description

If an output has delay enabled and is gracefully stopped once, upon startup a second time, it will not send the started signal. This is due to obs_output_signal_stop() pre-emtively setting delay_active to false. It is later set to false in
obs_output_end_data_capture_internal(), so this logic is not needed anyway.

When the encoder is then started a second time, output->delay_capturing will still be true, resulting in begin_delayed_capture() returning early and not firing the started signal.

Motivation and Context

I was testing other changes and measuring the various signals of outputs, and noticed that when I performed the reproduction steps above, I wasn't getting a started signal.

How Has This Been Tested?

Ubuntu 22.04
WHIP output

Tested every combination of:

  • starting/stopping stream
  • enabling/disabling stream delay

Repro steps:

  • Configure delayed RTMP stream encoder in OBS
  • Enable obs-websocket debug logging
  • Start stream to a server
    • You should see a starting then a started event
  • Stop stream gracefully (allowing delay to play out before stopping)
  • Start stream again
    • You should see a starting event but no started event

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

If an output has delay enabled and is gracefully stopped once, upon
startup a second time, it will not send the `started` signal. This is
due to `obs_output_signal_stop()` pre-emtively setting `delay_active`
to false. It is later set to `false` in
`obs_output_end_data_capture_internal()`, so this logic is not needed
anyway.
@tt2468 tt2468 added the Bug Fix Non-breaking change which fixes an issue label May 8, 2024
@Lain-B Lain-B self-requested a review May 18, 2024 23:59
@Lain-B Lain-B self-assigned this May 18, 2024
@Lain-B Lain-B removed their request for review May 19, 2024 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Non-breaking change which fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants