Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(avform): display true video height in video mode selection
Browse files Browse the repository at this point in the history
  • Loading branch information
initramfs committed Aug 7, 2016
1 parent 5324e76 commit 192c1e8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/widget/form/settings/avform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ void AVForm::selectBestModes(QVector<VideoMode> &allVideoModes)
{
VideoMode mode = allVideoModes[it->second];

if(newVideoModes.empty())
if (newVideoModes.empty())
{
newVideoModes.push_back(mode);
}
Expand All @@ -258,10 +258,8 @@ void AVForm::selectBestModes(QVector<VideoMode> &allVideoModes)
auto result = std::find_if(newVideoModes.cbegin(), newVideoModes.cend(),
[size](VideoMode mode) { return getModeSize(mode) == size; });

if(result == newVideoModes.end())
{
if (result == newVideoModes.end())
newVideoModes.push_back(mode);
}
}
}
allVideoModes = newVideoModes;
Expand All @@ -281,7 +279,7 @@ void AVForm::fillCameraModesComboBox()
qDebug("width: %d, height: %d, FPS: %f, pixel format: %s\n", mode.width, mode.height, mode.FPS, pixelFormat.toStdString().c_str());

if (mode.height && mode.width)
str += QString("%1p").arg(getModeSize(mode));
str += QString("%1p").arg(mode.height);
else
str += tr("Default resolution");

Expand Down

0 comments on commit 192c1e8

Please sign in to comment.