From 7e09a60d70a3afd682346d4cbe8e8abd270408b5 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Sun, 31 Jan 2016 13:04:45 +0100 Subject: [PATCH] Force bitrate to the valid range upon changing the RC mode. --- src/Config.h | 2 +- src/Encoder_Abstract.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Config.h b/src/Config.h index 406f0efc..75b8068c 100644 --- a/src/Config.h +++ b/src/Config.h @@ -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 /////////////////////////////////////////////////////////////////////////////// diff --git a/src/Encoder_Abstract.cpp b/src/Encoder_Abstract.cpp index 5ba30491..47947de3 100644 --- a/src/Encoder_Abstract.cpp +++ b/src/Encoder_Abstract.cpp @@ -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)