diff mbox series

[FFmpeg-devel,04/18] avradio/sdrinradio: Dont automatically select 2.56Mhz on the rtlsdr

Message ID 20230708212530.109692-4-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,01/18] avradio/sdrdemux: Fix uninitialized access | expand

Checks

Context Check Description
yinshiyou/configure_loongarch64 warning Failed to apply patch
andriy/configure_x86 warning Failed to apply patch

Commit Message

Michael Niedermayer July 8, 2023, 9:25 p.m. UTC
2.56Mhz produces more artifacts than lower sample rates at least
in the FM broadcast band

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavradio/sdrinradio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavradio/sdrinradio.c b/libavradio/sdrinradio.c
index c6f5742436..052e2298da 100644
--- a/libavradio/sdrinradio.c
+++ b/libavradio/sdrinradio.c
@@ -235,8 +235,8 @@  static int sdrindev_initial_hw_setup(AVFormatContext *s)
             (sdr->sdr_sample_rate < ranges[i].minimum || sdr->sdr_sample_rate > ranges[i].maximum))
             continue;
         if (sdr->rtlsdr_fixes)
-            // 2.88 and 3.2 Mhz do not work reliable here so lets not automatically choose them, the user can override this
-            if (ranges[i].maximum > (2560000 + 2880000)/2)
+            // 2.56, 2.88 and 3.2 Mhz do not work reliable here so lets not automatically choose them, the user can override this
+            if (ranges[i].maximum > (2560000 + 2160000)/2)
                 continue;
         max_sample_rate = FFMAX(max_sample_rate, ranges[i].maximum);
     }