obsproject / obsproject/obs-studio

Image Slideshow private image sources being passed to `obs_enum_sources`.

Open
#11,362 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
76.4k
Forks
10.2k
Avg merge
4d 23h
Merged PRs (30d)
12

Description

Operating System Info

Windows 11

Other OS

No response

OBS Studio Version

30.2.3

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/6i7sDBeYDxFWihBz

OBS Studio Crash Log URL

No response

Expected Behavior

[The OBS documentation] (https://docs.obsproject.com/reference-sources#c.obs_source_create_private) indicates that private sources are not enumerated by the obs_enum_sources function. Thus private sources created should not be passed to the callback provided to obs_enum_sources.

Current Behavior

In my plugin, I am seeing private sources (specifically those created by the Image Slideshow source) passed to the callback function I provide for obs_enum_sources. I have added a check for obs_obj_is_private for sources in my callback function, and logged any private sources the callback sees. As you can see at the very bottom of the provided log file, two private image sources are being passed back. I have also validated that these are not normal image sources (as all created image sources have already been passed through obs_enum_sources, and the only two private image sources in the scene collection originate from the Image Slideshow source.

I have had several reports of this issue causing crashes with my plugin. I have since fixed the issue with the check for a private source.

Steps to Reproduce
  1. Create an obs_enum_sources callback, that checks for private sources.
  2. Create a scene collection with an Image Slideshow (and some images in that slideshow).
  3. Trigger the obs_enum_sources call.
  4. See the private image sources appear in the callback.
Anything else we should know?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with an Image Slideshow and an obs_enum_sources callback that logs private sources, following the four steps in the report. Then read the obs_enum_sources implementation and the Image Slideshow source to trace how private image sources are handled; done means private sources no longer reach the callback while regular sources still do.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.