1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(avform): display true video height in video mode selection

This commit is contained in:
initramfs 2016-08-05 02:53:14 +08:00
parent 5324e768c3
commit 192c1e8ff5
No known key found for this signature in database
GPG Key ID: 78B8BDF87E9EF0AF

View File

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