From patchwork Sat Apr 27 23:54:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 48312 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1509:b0:1a9:af23:56c1 with SMTP id nq9csp1204972pzb; Sat, 27 Apr 2024 16:55:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUSNrt8U/j4JHPQL3CH+eXCYmWGq9mwP1AzjQIvUEkTnDJX6xRT+gx3ajITufjfj63lhb4XRtn0KXK99Ja6UGtLhz0/vHehRzJKuw== X-Google-Smtp-Source: AGHT+IHuAxXwJ+ErUPFIRD0dl2dOgOgRKbMY/FaYH6K//vdYk7oWoyQcicUnPIfHi/kg+v8JzOAq X-Received: by 2002:a2e:98d2:0:b0:2df:65b9:3a6f with SMTP id s18-20020a2e98d2000000b002df65b93a6fmr3186453ljj.2.1714262105566; Sat, 27 Apr 2024 16:55:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714262105; cv=none; d=google.com; s=arc-20160816; b=XrDxk07FrFk/OmtrwuBo+2dwUamfaEmJOPS1dDr8ItTyP19+Y/1Fx6eyMiyxDp/zwY WKN9gDv1X55ymU9UA7NsxIWP5kJ5HbHhDWtg7xzR2fC2dzhqGjorFQrNETIL6+167jfk 0i3DTHQ1EYTgpbLVP8aOXo117W7bdD7chUkhhOQRdrxCTna0kpDI/qYrDlUrD8AwHjgi 0f4pnsptnpUeyMa7c/K3y2r1s1ZRPIh9dIwZiTx6/ZquWdruteq8gKhxRACeJ7pzH2mi dk2rxbo3RrD85T4VqZRa0mk+kmfcVQxkUIQ9dlcuko6Y0kNsANHQPbRyFynxhPp3a/eQ V03w== 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:dkim-signature:delivered-to; bh=cAGvF0AG/T1YCD6FOcnfQspn1e82VdShjmkwbzxMXik=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=jC04qRo5r27dEB0iEDNhwOtGPvvz6vqiQQjW2qtMHmCM1aQMuaElOh9ZO47GAFrL3P /XXB/dn3hrrBajoz6xKY0hz3/FtcRSxxHfCm6LDDk8Du7olalHJSHN7qNhLOV+Btsaa1 Z5FC0Mfi0uafIZUgzOE2I/Qy13nZPYvgid681ct2Ani/O2jGceosAMPDOVW0vR6ryZx9 njiVgI3P+rCQ/bh29b5SDKcTnekihWH3WikENLeleDVCaQsI1uBY3qm9nZrKle/WKgxQ Q/6QcwwoM2MiEsP2WKytSrH2sNDoisAHuJuzdkSiMccGU4QVlqFg6L6on6YgTk5iBoyL LxKA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=CMfssqYo; 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 i1-20020a0564020f0100b0057267a56917si1578812eda.120.2024.04.27.16.55.05; Sat, 27 Apr 2024 16:55:05 -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; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=CMfssqYo; 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 BEAA968D2F9; Sun, 28 Apr 2024 02:54:37 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AFDE368D2D0 for ; Sun, 28 Apr 2024 02:54:28 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id E168A240002 for ; Sat, 27 Apr 2024 23:54:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1714262068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nKt+ffRIEKYjHT9PMiSnMnF3mBq05/JsLwFxMrhvLLg=; b=CMfssqYoYNJn9rifKIRj8vJvdFWTx+X8WoXJpJk0KzTa1AHSDNisbkrK2afxa1V8zCVR00 o1R2TU3PGsC67rPSbzCAzxrHTgZeZyWH2nU/EWXW2RE5MCB3fxoGlIQYMVoYHiUEKNag06 CEWNQY008iewbrsVqYMGmS4jYOcUKhZscjaHemrUzqBGkUdPSCb67PSTM2q7QP7lHe8FBg W/bF+iZ9LznrZx3vPu4ZUYwTziWA0khgjr+3TIGKXF5CDNVDgGrSKYJgqSV7nLN5M/rIst H804/xwuPqfO+cVAahjy2TfEttfRy83efHQMCW3/d4eiQmq9KzEKjSXYX8l1gw== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 28 Apr 2024 01:54:18 +0200 Message-ID: <20240427235424.3075968-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240427235424.3075968-1-michael@niedermayer.cc> References: <20240427235424.3075968-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 04/10] fftools/ffmpeg_mux: Remove unneeded initialization 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: 5yXi+Se4IM5X Not sure this change makes sense, the code is more robust with ret set Fixes: CID1559178 Unused value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- fftools/ffmpeg_mux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index a1583edd618..4306067eca2 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -290,7 +290,7 @@ static int mux_packet_filter(Muxer *mux, MuxThreadContext *mt, { MuxStream *ms = ms_from_ost(ost); const char *err_msg; - int ret = 0; + int ret; if (pkt && !ost->enc) { ret = of_streamcopy(&mux->of, ost, pkt); @@ -299,7 +299,6 @@ static int mux_packet_filter(Muxer *mux, MuxThreadContext *mt, else if (ret == AVERROR_EOF) { av_packet_unref(pkt); pkt = NULL; - ret = 0; *stream_eof = 1; } else if (ret < 0) goto fail;