From: Steinar H. Gunderson Date: Sun, 29 Apr 2018 11:09:12 +0000 (+0200) Subject: Loosen up the frequency sample rate check a bit; a test camera returned 48050 and... X-Git-Tag: 0.7.2~1 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=8d4f7ab2bf19a970d17a0ca69a624962bdecaad6;p=bmusb Loosen up the frequency sample rate check a bit; a test camera returned 48050 and 48100 quite consistently here. --- diff --git a/bmusb.cpp b/bmusb.cpp index 4a5f8a3..7a1e07a 100644 --- a/bmusb.cpp +++ b/bmusb.cpp @@ -252,7 +252,7 @@ int guess_sample_rate(const VideoFormat &video_format, size_t len, int default_r // See if we match or are very close to any of the mandatory HDMI sample rates. const int candidate_sample_rates[] = { 32000, 44100, 48000 }; for (int rate : candidate_sample_rates) { - if (abs(int(num_samples_per_second) - rate) < 50) { + if (abs(int(num_samples_per_second) - rate) <= 100) { return rate; } }