[FFmpeg-devel] [PATCH 03/14] avradio/sdrdemux: require better timeout for replacing station
Michael Niedermayer
michael at niedermayer.cc
Thu Jul 13 02:36:55 EEST 2023
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavradio/sdrdemux.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavradio/sdrdemux.c b/libavradio/sdrdemux.c
index 2103feaca8..fea4202709 100644
--- a/libavradio/sdrdemux.c
+++ b/libavradio/sdrdemux.c
@@ -216,7 +216,8 @@ static int create_station(SDRContext *sdr, Station *candidate_station) {
}
}
if (best_station) {
- if (score > best_station->score && conflict == INT_MAX) {
+ if (score > best_station->score && conflict == INT_MAX &&
+ candidate_station->timeout < best_station->timeout) {
int log_level = fabs(best_station->frequency - freq) < 3.0 ? AV_LOG_DEBUG : AV_LOG_WARNING;
av_log(sdr->avfmt, log_level, "Update station score:%f -> %f freq: %f %f -> %f\n",
best_station->score, score,
--
2.31.1
More information about the ffmpeg-devel
mailing list