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:
jp9000
2017-10-04 15:58:06 -07:00
parent 9321b822bf
commit a0e8c7a5c1

View File

@@ -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));