Skip to content
Snippets Groups Projects
Commit c3a24f70 authored by Edric Milaret's avatar Edric Milaret Committed by Guillaume Roguez
Browse files

windows: fix video apply settings bug

Refs #72539

Change-Id: I2c7f3e1375d104db89188763bcafa6e78fe49891
parent ee8201bc
No related branches found
No related tags found
No related merge requests found
...@@ -237,12 +237,14 @@ VideoDeviceImpl::applySettings(VideoSettings settings) ...@@ -237,12 +237,14 @@ VideoDeviceImpl::applySettings(VideoSettings settings)
{ {
if (!settings.video_size.empty()) { if (!settings.video_size.empty()) {
auto pmt = capMap_[settings.video_size]; auto pmt = capMap_[settings.video_size];
if (pmt != nullptr) {
((VIDEOINFOHEADER*) pmt->pbFormat)->AvgTimePerFrame = settings.framerate; ((VIDEOINFOHEADER*) pmt->pbFormat)->AvgTimePerFrame = settings.framerate;
if (FAILED(cInterface->streamConf_->SetFormat(capMap_[settings.video_size]))) { if (FAILED(cInterface->streamConf_->SetFormat(capMap_[settings.video_size]))) {
RING_ERR("Could not set settings."); RING_ERR("Could not set settings.");
} }
} }
} }
}
DeviceParams DeviceParams
VideoDeviceImpl::getDeviceParams() const VideoDeviceImpl::getDeviceParams() const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment