From patchwork Sun Jun 30 23:12:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 50233 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:cc64:0:b0:482:c625:d099 with SMTP id k4csp1460140vqv; Sun, 30 Jun 2024 16:14:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUVEljz1s8Mj4Gr5EyriDciJxWwMXatMVcgq946hrLSkyTiB3ko/c44h7upFguF9tckVcgaqItUq14a/sw1rdveMUS6JX2I1CNfow== X-Google-Smtp-Source: AGHT+IHMLN46Z+fjD+gNE1weSR6OWA6gkxE4uUkm9JP/YyiboOgJu/kdPARiHiYHb2B+Zdmdin8i X-Received: by 2002:a2e:a80c:0:b0:2ee:6254:f9f1 with SMTP id 38308e7fff4ca-2ee6254fb37mr28331641fa.6.1719789248144; Sun, 30 Jun 2024 16:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719789248; cv=none; d=google.com; s=arc-20160816; b=C74ohDdPSqeffw/DDSH0NrIWX8J8p+TuTNPhd7TZyem6lPbGXtjdZKIulLME8LUNTA 49tw0GzXI+T7KDO7V4iPi4GYO6Ows7dcLO9Dn6KxsFDp/Ep/DYTn1BWoWZzjdFS2wWoz QP2nvcjZe3NijHiYLma8YeGhustb19WX8+bTOh4IChCY1+S0ErRPbqmUNZaAtsxC6poz KUkciBgbgKxnau+QqQ3uyizOEMzi0RCooQVqsTbI0wkkmeKfVVHmtXb2DzyhwZhr6CP8 +SpJswKetbaLt3/b2L6Ern4qlPnt5/eJ5K19MDV9eQk/vrUlK8NthhmWqJAcDgg5i0iw FaBw== 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=1p9yEFoXIAiuJIN6L+OmZrUbS84toSE3MpvKntJ4f7U=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=qqFGy0u+4BLwd6+nI+NHA35vdzt6ypcczYson95NzXGhPRsHJ9jqgv1Idcon8hlAcV l+yoivCdG0ORE7FTLzwO0KZWrkroG9pEHrW6UkhyPkfMh4lPUXteWk6EtO0Q4Z0M7bZQ 4MZ2d1ZOpbYGrn4laEv2XgOEwAB+WHd0Tbnu+QfT9e77jMA096j1uDWp1eNwzL1MWDa5 8EnVIpa3q6e/KrHr8KEkBLxqQduuviwTFDYQAJF3FxbV5WYg7uTvI80d2zsSFGMTWTKd L04rYs+0tGUOdk+4eIvUQxJv1iiO1B574YdIxScWH1L0bmK3b/E9xe4bOBrOO2hcNVyz axow==; 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=LBDolNIa; 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 4fb4d7f45d1cf-586150337c2si3024296a12.263.2024.06.30.16.14.07; Sun, 30 Jun 2024 16:14:08 -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=LBDolNIa; 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 34D2768D67A; Mon, 1 Jul 2024 02:13:33 +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 F037A68D673 for ; Mon, 1 Jul 2024 02:13:13 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 5014C1BF203 for ; Sun, 30 Jun 2024 23:13:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1719789193; 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=09UNeqBxm//UqWrkoO77h3qlsHbuumHrNNbqD087mUQ=; b=LBDolNIaVygUB/gjaR/JNCXcYRphNrjNLqmqboN+N/wqD89n5n+R+X8vbKY/5/gK8H3PYA /gb5bsNZS66EDEUAnNtBzFJATFOBYF7wSULwZWe0WEbJ/ycqTc60RqZ3DA2dQEz/uVN2Mj 9PJ5/LA/PG3S/7Cr7yAXc6TteQMP0oAAbwRmoSKLZvMBn51hiKrzD3uH+shrm7CP89hhLQ zJw96ue294vQCK8MDefTEmp5R5zPD8XCFJeTiCN3gQcXRfFvl+qACPACIxg/hRE9HUHh16 4AoT73acrbo45XZ2S1mH38GklRPx6ttLTrwnPjsQv2yeQsOGlYMoMw18cRBzdA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 1 Jul 2024 01:12:45 +0200 Message-ID: <20240630231306.3779027-6-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240630231306.3779027-1-michael@niedermayer.cc> References: <20240630231306.3779027-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 06/11] doc/examples/mux: remove nop 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: 5r0IUEztpQ18 Found through code review related to CID1604493 Overflowed constant Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- doc/examples/mux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/examples/mux.c b/doc/examples/mux.c index b034aad56f7..0f3a2bb125f 100644 --- a/doc/examples/mux.c +++ b/doc/examples/mux.c @@ -347,8 +347,7 @@ static int write_audio_frame(AVFormatContext *oc, OutputStream *ost) if (frame) { /* convert samples from native format to destination codec format, using the resampler */ /* compute destination number of samples */ - dst_nb_samples = av_rescale_rnd(swr_get_delay(ost->swr_ctx, c->sample_rate) + frame->nb_samples, - c->sample_rate, c->sample_rate, AV_ROUND_UP); + dst_nb_samples = swr_get_delay(ost->swr_ctx, c->sample_rate) + frame->nb_samples; av_assert0(dst_nb_samples == frame->nb_samples); /* when we pass a frame to the encoder, it may keep a reference to it