From patchwork Fri Jul 7 17:22:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 42524 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1e:b0:12b:9ae3:586d with SMTP id c30csp7450143pzh; Fri, 7 Jul 2023 10:23:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlEI5JLROFhLtaKgTr4PVrgkmIceljQIJsm/yEjjSbm6fEDJSJjB5K75dblEwMEQOS5DwXJP X-Received: by 2002:a17:906:4794:b0:98d:abd4:4000 with SMTP id cw20-20020a170906479400b0098dabd44000mr9021375ejc.35.1688750604526; Fri, 07 Jul 2023 10:23:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688750604; cv=none; d=google.com; s=arc-20160816; b=mdJDxSL8C+82tTPvskdOuQps8jYTdknqvtA7PTDgj+iksa6Y9+S7ra/x8Go3p6xZsN CzdMr5ofOFy92YqBAtr/9YzIPVbElvZJHjXB8sNvTfRS+Y6NNh5y2sQCWOx4dwWmNi1S RgjyX9/L0J3BJlWxvSpjA7ctFIlWffdRq6dc5I5gw7KhPAgFpmO78pgIK7cu0x7hezUC bAzsGaXNmc41beNEt2F2FYvCrbjKHlxCN2A+UmkPHZkdA6R9LLCX97/GDS6e4hKCZ7WS Wp7STl0ki1TOBUiHenAnNiFes6TJTVRGDh0p3XXcLDAXv0GUds5ttqjOuEiNApo9b2Fg qMTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=hduR8Qjw+Q+GptoUIEi+zInNarop5VryDMM+/NRyW9U=; fh=YYwLYmpaV0Fpw/rxmSKNRLS2XzDkAlGbHATiKOPtZrY=; b=PMCSunbJYVi4mE6lX/+yckDcAHtGfZ4zkzoFxBJ3Kf0oIjGMS7jSEKaU4qFrHEE7WG 4Wsw1ejZrrAh/MTgOOE7CVhXHogBMQYQp4ffHtNmBqKXqVWvAnZ4+65Vl6nYZGB3VlXL zbHoj5G8LPXa6bRGpth2UAKQraLt2GGWe4cVw+t+fGkO43jE9+nW5ZpqaPxx8Ej1m87D M77hGMwncNvGOAOoOG5bjAZtgclEX8lb5VtNDe9uvIQAxhDVcdLtLNJdRvkJ79gUEHRT JEqzdmTUrhspsOtQC8UeVbynrNUEptfcCsBucekSzMQJNiZfMcghV/FS5A8UabV/3s05 nBaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id oy15-20020a170907104f00b00992bfd1ffc2si1996191ejb.981.2023.07.07.10.23.24; Fri, 07 Jul 2023 10:23:24 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 286DA68C831; Fri, 7 Jul 2023 20:22:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A72C268C7D6 for ; Fri, 7 Jul 2023 20:22:33 +0300 (EEST) X-GND-Sasl: michael@niedermayer.cc Received: by mail.gandi.net (Postfix) with ESMTPSA id E486BC0003 for ; Fri, 7 Jul 2023 17:22:32 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 7 Jul 2023 19:22:21 +0200 Message-Id: <20230707172224.2368067-6-michael@niedermayer.cc> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230707172224.2368067-1-michael@niedermayer.cc> References: <20230707172224.2368067-1-michael@niedermayer.cc> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/9] avradio/sdrdemux: count timeout irrespective of a station being active X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 3BJ6kc9obFpC Signed-off-by: Michael Niedermayer --- libavradio/sdrdemux.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) {