Force bitrate to the valid range upon changing the RC mode.

This commit is contained in:
LoRd_MuldeR 2016-01-31 13:04:45 +01:00
parent ce742f7b99
commit 7e09a60d70
2 changed files with 3 additions and 1 deletions

View File

@ -35,7 +35,7 @@
#define VER_LAMEXP_MINOR_LO 4
#define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 2
#define VER_LAMEXP_BUILD 1860
#define VER_LAMEXP_BUILD 1861
#define VER_LAMEXP_CONFG 1818
///////////////////////////////////////////////////////////////////////////////

View File

@ -40,6 +40,7 @@ AbstractEncoder::~AbstractEncoder(void)
{
}
/*
* Setters
*/
@ -51,6 +52,7 @@ void AbstractEncoder::setRCMode(const int &mode)
MUTILS_THROW("This RC mode is not supported by the encoder!");
}
m_configRCMode = qMax(0, mode);
m_configBitrate = qBound(0, m_configBitrate, toEncoderInfo()->valueCount(m_configRCMode) - 1);
}
void AbstractEncoder::setBitrate(const int &bitrate)