[FFmpeg-devel] [PATCH 13/18] avradio/sdrdemux: fix bug adding candidate stations and then crashing

Michael Niedermayer michael at niedermayer.cc
Sun Jul 9 00:25:25 EEST 2023


Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavradio/sdrdemux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavradio/sdrdemux.c b/libavradio/sdrdemux.c
index 1c77583fd4..5300311c3a 100644
--- a/libavradio/sdrdemux.c
+++ b/libavradio/sdrdemux.c
@@ -1818,7 +1818,7 @@ process_next_block:
             int nb_stations = ff_sdr_find_stations(sdr, sdr->block_center_freq, sdr->sdr_sample_rate*0.5, station_list, FF_ARRAY_ELEMS(station_list));
             for(int i = 0; i<nb_stations; i++) {
                 Station *station = station_list[i];
-                if (!station->stream) {
+                if (!station->stream && station->in_station_list) {
                     /* audio stream */
                     AVStream *st = avformat_new_stream(s, NULL);
                     SDRStream *sst;
-- 
2.31.1



More information about the ffmpeg-devel mailing list