fixed issue 98
This commit is contained in:
parent
e0cad73a68
commit
ab48aa3071
|
@ -40,7 +40,7 @@
|
|||
#include "Exception.h"
|
||||
#include "Util.h"
|
||||
#include "VorbisLibEncoder.h"
|
||||
|
||||
#define VORBIS_MIN_BITRATE 45
|
||||
|
||||
/* =================================================== local data structures */
|
||||
|
||||
|
@ -79,6 +79,15 @@ VorbisLibEncoder :: init ( unsigned int outMaxBitrate )
|
|||
getInChannel() );
|
||||
}
|
||||
|
||||
if ( getOutBitrateMode() == abr || getOutBitrateMode() == cbr ) {
|
||||
if ( getOutBitrate() < VORBIS_MIN_BITRATE ) {
|
||||
throw Exception( __FILE__, __LINE__,
|
||||
"output bitrate is lower than libvorbis minimum",
|
||||
getOutBitrate() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( getOutSampleRate() == getInSampleRate() ) {
|
||||
resampleRatio = 1;
|
||||
converter = 0;
|
||||
|
|
Loading…
Reference in New Issue