Skip to content
Snippets Groups Projects
Commit 2b45e582 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Adrien Béraud
Browse files

video: prevent exception on macOS

Prevent exception when getting supported frame rates.

Change-Id: I2fe140bb51e0f20510b1c3f6a62df8921030dc7d
parent 5a83c7a2
No related branches found
No related tags found
No related merge requests found
......@@ -165,7 +165,11 @@ VideoDeviceImpl::getSizeList() const
std::vector<FrameRate>
VideoDeviceImpl::getRateList(const std::string& channel, VideoSize size) const
{
return available_rates_.at(size);
auto it = available_rates_.find(size);
if (it != available_rates_.end()) {
return it->second;
}
return {};
}
std::vector<VideoSize>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment