diff mbox series

[FFmpeg-devel,09/14] avradio/sdr: Remove code setting frequency from variable being 0

Message ID 20230718214542.685375-9-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,01/14] avradio/sdrdemux: Add Mittelwelle / Mediumwave / Mediumfrequency band | expand

Checks

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

Commit Message

Michael Niedermayer July 18, 2023, 9:45 p.m. UTC
wanted_freq is 0 at this point

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavradio/sdrdemux.c   | 4 ----
 libavradio/sdrinradio.c | 3 ---
 2 files changed, 7 deletions(-)
diff mbox series

Patch

diff --git a/libavradio/sdrdemux.c b/libavradio/sdrdemux.c
index b22d3fed13..b5e9b9ad04 100644
--- a/libavradio/sdrdemux.c
+++ b/libavradio/sdrdemux.c
@@ -1729,10 +1729,6 @@  static int sdrfile_initial_setup(AVFormatContext *s)
     //After reading the first packet header we return to the begin so the packet can be read whole
     avio_seek(s->pb, 0, SEEK_SET);
 
-    ret = ff_sdr_set_freq(sdr, sdr->wanted_freq);
-    if (ret < 0)
-        return ret;
-
     sdr->read_callback = sdrfile_read_callback;
 
     return ff_sdr_common_init(s);
diff --git a/libavradio/sdrinradio.c b/libavradio/sdrinradio.c
index d569842a9c..d12b0b73fe 100644
--- a/libavradio/sdrinradio.c
+++ b/libavradio/sdrinradio.c
@@ -326,9 +326,6 @@  static int sdrindev_initial_hw_setup(AVFormatContext *s)
         av_log(s, AV_LOG_ERROR, "setSampleRate fail: %s\n", SoapySDRDevice_lastError());
         return AVERROR_EXTERNAL;
     }
-    ret = ff_sdr_set_freq(sdr, sdr->wanted_freq);
-    if (ret < 0)
-        return ret;
 
     //List the available custom options for this specific driver to the user
     arg_info = SoapySDRDevice_getSettingInfo(soapy, &length);