]> git.sesse.net Git - bmusb/blobdiff - bmusb.cpp
Loosen up the frequency sample rate check a bit; a test camera returned 48050 and...
[bmusb] / bmusb.cpp
index 4a5f8a3c4b588336aa67ad3448f6e78d17e9bfb8..7a1e07a84596b37543ca778c70a465e2ce1a0290 100644 (file)
--- 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;
                }
        }