win-dshow: Fix video playback when default format is MJPEG
Video playback doesn't work if the default format is MJPEG and there are other formats to use; this is because the useDefaultConfig variable is still set to true, which overrides the format value that would normally tell it to convert to RGB.
This commit is contained in:
@@ -847,6 +847,8 @@ bool DShowInput::UpdateVideoConfig(obs_data_t *settings)
|
||||
|
||||
if (videoConfig.internalFormat == VideoFormat::MJPEG) {
|
||||
videoConfig.format = VideoFormat::XRGB;
|
||||
videoConfig.useDefaultConfig = false;
|
||||
|
||||
if (!device.SetVideoConfig(&videoConfig)) {
|
||||
blog(LOG_WARNING, "%s: device.SetVideoConfig (XRGB) "
|
||||
"failed", obs_source_get_name(source));
|
||||
|
Reference in New Issue
Block a user