[FFmpeg-cvslog] [ffmpeg-radio] 02/14: avradio/sdrdemux: Fix corner case in snap2band
Michael Niedermayer
ffmpeg-git at ffmpeg.org
Sat Jul 22 16:55:48 EEST 2023
This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository libavradio.
commit 4561bcd02e49b49146bc275150bd59d57d47e3b0
Author: Michael Niedermayer <michael at niedermayer.cc>
AuthorDate: Tue Jul 18 00:20:59 2023 +0200
Commit: Michael Niedermayer <michael at niedermayer.cc>
CommitDate: Tue Jul 18 18:43:23 2023 +0200
avradio/sdrdemux: Fix corner case in snap2band
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavradio/sdrdemux.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavradio/sdrdemux.c b/libavradio/sdrdemux.c
index 318b5465da..6b1553b130 100644
--- a/libavradio/sdrdemux.c
+++ b/libavradio/sdrdemux.c
@@ -1368,6 +1368,8 @@ static int64_t snap2band(SDRContext *sdr, int64_t wanted_freq, int64_t delta) {
min_center_freq += sdr->bandwidth / 2;
max_center_freq -= sdr->bandwidth / 2;
}
+ min_center_freq = av_clip64(min_center_freq, sdr->min_center_freq, sdr->max_center_freq);
+ max_center_freq = av_clip64(max_center_freq, sdr->min_center_freq, sdr->max_center_freq);
// Is the band in the direction we want to seek to ?
if (FFSIGN(min_center_freq - wanted_freq) == FFSIGN(max_center_freq - wanted_freq))
More information about the ffmpeg-cvslog
mailing list