Skip to content

[Bug]: Unhiding a NDI source with behavior set to disconnect, will not restart the thread  #1078

@BitRate27

Description

@BitRate27

Operating System Version

Windows10

CPU

No response

GPU

No response

NDI Devices

No response

OBS Version

30.2.2

OBS Installation Method

exe

OBS-NDI Version

actual_6.0.0

OBS-NDI Installation Method

Copy dll from build

[Extra] Installation Steps

No response

OBS Log [URL]

https://obsproject.com/logs/jqoAQNeJeAYkmr4F

NDI Version

NDI SDK WIN64 12:45:30 May 6 2024 6.0.1.0

Describe the bug

When you open a project with an NDI source in preview hidden and with disconnect behavior property set, when you unhide, the NDI source does not reconnect (restart the thread) and it is not displayed in preview.

Steps to reproduce the problem

  1. Select Studio Mode
  2. Create a scene "Scene 1" with two ndi sources: NDI 1 and NDI 2
  3. Hide NDI 2
  4. Change the behavior for NDI 2 to Disconnect
  5. Exit OBS
  6. Restart OBS
  7. Select "Scene 1" (should be default)
  8. Unhide NDI 2

Expected behavior

NDI 2 shown in preview

Screenshots

No response

Additional context

Investigating this, it seems we need to call ndi_source_update to restart the thread when we get the ndi_source_shown call. It is also necessary to change the check for restarting the thread to look for obs_source_showing instead of obs_source_active.

Adding the following line in ndi_source_shown will fix the issue:
ndi_source_update(data, obs_source_get_settings(s->obs_source));

Also please ignore the extra log messages in the obs log submitted. These were added while debugging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions