提交 c431e043 编写于 作者: J jp9000

win-dshow: Pass proper range value to frame

The "full_range" member variable of the video frame was being passed
"false" each time even though it may not necessarily be set to partial
range
上级 544953c8
......@@ -440,7 +440,6 @@ void DShowInput::OnVideoData(const VideoConfig &config,
frame.width = config.cx;
frame.height = config.cy;
frame.format = ConvertVideoFormat(config.format);
frame.full_range = false;
frame.flip = (config.format == VideoFormat::XRGB ||
config.format == VideoFormat::ARGB);
......@@ -957,13 +956,16 @@ inline bool DShowInput::Activate(obs_data_t *settings)
if (!device.ConnectFilters())
return false;
enum video_colorspace cs = GetColorSpace(settings);
video_range_type range = GetColorRange(settings);
frame.full_range = range == VIDEO_RANGE_FULL;
if (device.Start() != Result::Success)
return false;
enum video_colorspace cs = GetColorSpace(settings);
bool success = video_format_get_parameters(
cs, GetColorRange(settings),
cs, range,
frame.color_matrix,
frame.color_range_min,
frame.color_range_max);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册