Main: fixed parsing of --audio-capture-format

sample_rate was incorrectly parsed.
This commit is contained in:
Martin Pulec
2017-10-17 10:44:01 +02:00
parent 3d14c8f68e
commit b0895ed71c

View File

@@ -413,8 +413,8 @@ bool parse_audio_capture_format(const char *optarg)
}
audio_capture_bps = bps / 8;
} else if (strncmp(item, "rate=", strlen("bps=")) == 0) {
long long val = unit_evaluate(item + strlen("rate="));
} else if (strncmp(item, "sample_rate=", strlen("sample_rate=")) == 0) {
long long val = unit_evaluate(item + strlen("sample_rate="));
assert(val > 0 && val <= numeric_limits<decltype(audio_capture_sample_rate)>::max());
audio_capture_sample_rate = val;
} else {