diff mbox series

[FFmpeg-devel,6/9] avradio/sdrdemux: count timeout irrespective of a station being active

Message ID 20230707172224.2368067-6-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/9] avradio/sdr: use AVTree for candidate stations | 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 7, 2023, 5:22 p.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavradio/sdrdemux.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavradio/sdrdemux.c b/libavradio/sdrdemux.c
index ad3e253ced..6cb9d3b70a 100644
--- a/libavradio/sdrdemux.c
+++ b/libavradio/sdrdemux.c
@@ -327,12 +327,11 @@  static void decay_stations(SDRContext *sdr)
         if (station->frequency - station->bandwidth/2 < sdr->block_center_freq - sdr->bandwidth/2 ||
             station->frequency + station->bandwidth/2 > sdr->block_center_freq + sdr->bandwidth/2)
             continue;
-        if (station->stream)
-            continue;
 
         if (station->in_station_list) {
             if (station->timeout++ > STATION_TIMEOUT) {
-                station->in_station_list = 0;
+                if (!station->stream)
+                    station->in_station_list = 0;
             }
         } else {
             if (station->timeout++ > CANDIDATE_STATION_TIMEOUT) {