Skip to content

[Bug]: OBS crash when turning on main output after choosing an unsupported color format #1147

@BitRate27

Description

@BitRate27

Operating System Version

macOS Monterrey, Windows 10

CPU

No response

GPU

No response

NDI Devices

No response

OBS Version

31.0.0

OBS Installation Method

exe, pkg

DistroAV Version

6.0.0

DistroAV Installation Method

exe, pkg

[Extra] Installation Steps

No response

OBS Log [URL]

No response

NDI Version

6.0.1

Describe the bug

When you turn on main output in DistroAV NDI settings after you have chosen an unsupported color format, OBS will crash inside OBS due to a problem with the output->video.

Steps to reproduce the problem

  1. In Tools->DistroAV NDI settings, turn OFF Main output. Select OK.
  2. In Settings->Advanced, for Video Color Format choose: P010. Select OK.
  3. In Tools->DistroAV NDI settings, turn ON Main output. Select OK.
  4. In log file, should see: unsupported pixel format n.
  5. In Tools->DistroAV NDI settings, turn OFF Main output. Select OK.
  6. In Settings->Advanced, for Video Color Format choose NV12. Select OK.
  7. In Tools->DistroAV NDI settings, turn ON Main output. Select OK.
    Will crash OBS on Windows and macOS at this point.

Expected behavior

The Main output should be turned on and OBS should be outputting the Main program output to NDI.

Screenshots

No response

Additional context

The crash is here when looking at video->parent. Normally parent is 0000x0 but if the main output creation is aborted due to an unsupported pixel format, the next time a main output is created, the parent is non-null and causes a crash.

From: libobs/media-io/video-io.c:

static const video_t *get_const_root(const video_t *video)
{
	while (video->parent)
		video = video->parent;
	return video;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Output (Program/Preview)relate to NDI Output Progam or Previewbugcrashif this issue / bug cause a crash

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions