You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
637 B
17 lines
637 B
2 years ago
|
diff --git a/src/pack_utils.c b/src/pack_utils.c
|
||
|
index 2253f0d..2a83497 100644
|
||
|
--- a/src/pack_utils.c
|
||
|
+++ b/src/pack_utils.c
|
||
|
@@ -195,6 +195,11 @@ int WavpackSetConfiguration64 (WavpackContext *wpc, WavpackConfig *config, int64
|
||
|
int num_chans = config->num_channels;
|
||
|
int i;
|
||
|
|
||
|
+ if (!config->sample_rate) {
|
||
|
+ strcpy (wpc->error_message, "sample rate cannot be zero!");
|
||
|
+ return FALSE;
|
||
|
+ }
|
||
|
+
|
||
|
wpc->stream_version = (config->flags & CONFIG_COMPATIBLE_WRITE) ? CUR_STREAM_VERS : MAX_STREAM_VERS;
|
||
|
|
||
|
if ((config->qmode & QMODE_DSD_AUDIO) && config->bytes_per_sample == 1 && config->bits_per_sample == 8) {
|