Fixed parameter validation for Wave encoder.
This commit is contained in:
parent
7ced6160c2
commit
ce37f51a3d
@ -35,7 +35,7 @@
|
|||||||
#define VER_LAMEXP_MINOR_LO 4
|
#define VER_LAMEXP_MINOR_LO 4
|
||||||
#define VER_LAMEXP_TYPE Alpha
|
#define VER_LAMEXP_TYPE Alpha
|
||||||
#define VER_LAMEXP_PATCH 7
|
#define VER_LAMEXP_PATCH 7
|
||||||
#define VER_LAMEXP_BUILD 1874
|
#define VER_LAMEXP_BUILD 1876
|
||||||
#define VER_LAMEXP_CONFG 1818
|
#define VER_LAMEXP_CONFG 1818
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -57,7 +57,8 @@ void AbstractEncoder::setRCMode(const int &mode)
|
|||||||
|
|
||||||
void AbstractEncoder::setBitrate(const int &bitrate)
|
void AbstractEncoder::setBitrate(const int &bitrate)
|
||||||
{
|
{
|
||||||
if (qMax(0, bitrate) >= toEncoderInfo()->valueCount(m_configRCMode))
|
const int valueCount = toEncoderInfo()->valueCount(m_configRCMode);
|
||||||
|
if ((valueCount > 0) && (qMax(0, bitrate) >= valueCount))
|
||||||
{
|
{
|
||||||
MUTILS_THROW("The specified bitrate/quality is out of range!");
|
MUTILS_THROW("The specified bitrate/quality is out of range!");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user