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

Michael Niedermayer michael at niedermayer.cc
Sun Jul 9 00:25:16 EEST 2023


2.56Mhz produces more artifacts than lower sample rates at least
in the FM broadcast band

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

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);
     }
-- 
2.31.1



More information about the ffmpeg-devel mailing list