From patchwork Sun Jul 30 22:11:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 43038 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:7927:b0:130:ccc6:6c4b with SMTP id b39csp2030750pzg; Sun, 30 Jul 2023 15:13:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlHUHwBdcJq57A3yUBxV0zydJ5cyQOH5h78y4ocIXeWQx5OxR03h2xUASej/pipR4G2njuv/ X-Received: by 2002:a17:906:db0d:b0:98d:ebb7:a8b0 with SMTP id xj13-20020a170906db0d00b0098debb7a8b0mr5308802ejb.14.1690755190875; Sun, 30 Jul 2023 15:13:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690755190; cv=none; d=google.com; s=arc-20160816; b=Z8XORKbapXLxglhEt0HN3LP5CbmktG50J22SCinstqXWabpXql5REJ2HxwfV8Vh82h T0gklWNb69vxt0ItnJEoIfG2z+W+4+0V+7vdKt06F+rp3CRxRZqheJdoTr5+45nrcxwZ ouPOn8W/fHpoM22Rz6/2e2Jelt5yJc1agBROOsoTAizB8iGbBgMuqkP6pvxV3FstV33P sFJsoiJBNRnXy/BHaNyoOS/3QV3uttup4u9raR7szY12EpTUo0UbctfQ7no8M45+7vwq Rj0rWNvkGe6ma3CiZhT4sHF2QSDtx4b1llxUf+6Q43lTmND/xzTPlj6YATiiDoh1g6z1 0utw== 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=Q+b4s38fPGU/WaQdYVXicE/TI7QahuERdRHh+NNDO3Y=; fh=YYwLYmpaV0Fpw/rxmSKNRLS2XzDkAlGbHATiKOPtZrY=; b=x1G3Qwo4TQL3JFe7e6RitI3qZYpVa6YzMIKd1lvLET/y5Ek5/Zx3mHX8bOXrnr70MH vf61ZJZrWjALk38UCLx99Dz8U4KFLvjOV1YeaUO8GzmvG8LRX+t+DypNqYvMjhQEySzm vjz6LQzWGYXV4Yhq1JwQAZXDkTBjhUVzR3K8YflOrS7vTgXeA9Vx5lJXdLz6KsHWXJfc LQe3p/nNp8wr3NJCsB8AqAprkfGSfVwHVVVPzdhsb9b4XMp5AX04OSMWhyZd30NsGcer Jht2sY8vDYfIhxJZ/SpBW+DEFE+p4Al/Dgc1HADJc1JHG11B2UyIr1+ijBOdC271R79h KtEQ== 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 va16-20020a17090711d000b0099290e2c162si6543903ejb.444.2023.07.30.15.13.10; Sun, 30 Jul 2023 15:13:10 -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 3B55D68BC6A; Mon, 31 Jul 2023 01:11:53 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 743F068C562 for ; Mon, 31 Jul 2023 01:11:43 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 95BEF1BF204 for ; Sun, 30 Jul 2023 22:11:42 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 31 Jul 2023 00:11:26 +0200 Message-Id: <20230730221131.1205193-7-michael@niedermayer.cc> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230730221131.1205193-1-michael@niedermayer.cc> References: <20230730221131.1205193-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 07/12] avradio/avformat/sdrdemux: Avoid uninitialized memory on mono -> stereo switch 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: Lq+i/LOJHRij Signed-off-by: Michael Niedermayer --- libavformat/sdrdemux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/sdrdemux.c b/libavformat/sdrdemux.c index 69349add7b..8f0f4657f3 100644 --- a/libavformat/sdrdemux.c +++ b/libavformat/sdrdemux.c @@ -1150,6 +1150,8 @@ static int demodulate_fm(SDRContext *sdr, Station *station, AVStream *st, AVPack sst->out_buf[2*i+0] = m + q; sst->out_buf[2*i+1] = m - q; } else { + newbuf[2*i+1] = 0; + sst->out_buf[2*i+0] = sst->out_buf[2*i+1] = m; }