[FFmpeg-devel] [PATCH 01/14] avradio/rds: reset station timeout on successfull group decode

Michael Niedermayer michael at niedermayer.cc
Thu Jul 13 02:36:53 EEST 2023


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

diff --git a/libavradio/rds.c b/libavradio/rds.c
index 99e5360b72..55b24a0d9e 100644
--- a/libavradio/rds.c
+++ b/libavradio/rds.c
@@ -123,6 +123,9 @@ static int decode_rds_group(SDRContext *sdr, Station *station, uint16_t group[4]
         return 0; // skip first packet with new PI, likely its just damaged
     }
 
+    //sucessfully decoding a RDS group implies that the station has been detected correctly
+    station->timeout = 0;
+
     switch(a) {
     case 0:
         AV_WB16(station->name + 2*(group[1]&3), group[3]);
-- 
2.31.1



More information about the ffmpeg-devel mailing list