From patchwork Sun Sep 8 17:14:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51401 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1356443vqu; Sun, 8 Sep 2024 17:55:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUl0IDJDPLVXFO5f7eTaekqnJxBOr3DvJu63K1mnSUNwiCyVgMg3lA/tfu+9aTJ1AY7TmvQ+0GczkmGcHZxxLqX@gmail.com X-Google-Smtp-Source: AGHT+IE56uJccv1lRv7c2ZuprR3OqBYL9NI9imndtshXT57kLN0cwBJxBj2G0ju/0V3ug9rKQhHV X-Received: by 2002:a17:907:3f87:b0:a8d:2624:1a85 with SMTP id a640c23a62f3a-a8d26242590mr133734766b.12.1725843313234; Sun, 08 Sep 2024 17:55:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725843313; cv=none; d=google.com; s=arc-20240605; b=D8wyVVmIDhTCJ2XPrJO0dWPtlM5W/ZpFfAZCaTIrkpGfYLmao6D09HF4DW7+i8ltOY JhEKnQgrRHC0aE2lxDN0S31D8fWhgUvCJjrskSBQMNHdbTp3OUrqV+qZW5+SlHdyS42r Wl4KFvJdDXqYrmz+jMn1wTFMhPcymMHl0ZXQjbNzLIMIuC1b//DAQ8xFBECC6brXuDUW DK8AuUgy5TXRutn7o/ADnJG/JMgKhiZNPJw88Yg67tr46aguQ9pFFj65aIViMry0UMEv tt1ix4Nf5YbERCMsWUxmy0YOVOt2PkFxLU4olEdefBOt6zWJ/1wDsGFH/KSz5qQW+D3B E40g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:dkim-signature :delivered-to; bh=qm0RqWFXNKtu8ArEz5yR4rvdf6ZXYgQSklxos/eNHpc=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=MyHmJSPuYaX5SGum+UUtKxzvocog2d/LToJtzMdNSNDLKU5HQMILEMHHC1DabIKN9J Qk96DQj+RoX9jS56I4MEnPbvU6zexVFQROMuOcTSCFHutV/8Q7OA+5mtWWK5HTgQeNE4 1LpSYC2BXg6B4G4R4kzla9MaddDx0zj+KF5y8/fvMGLuYGDOd8lOojEeSzOkTPyhbt6j Mirj+bDgaczoetCizCng9CRz4T041Pn0viixzw5G3dmG437BE6Wnc80yWNCCPB0b9HDQ nXG3VfQ0Y4ORlgJKpjhsxTp0vuzM+U+3e7gl6XtA3/t3zw4g1UTlwOBitNIffcWdHdUf eNwg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=cXoY3Xqm; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d2584c6fcsi314935566b.87.2024.09.08.17.55.12; Sun, 08 Sep 2024 17:55:13 -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=@gmail.com header.s=20230601 header.b=cXoY3Xqm; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C286668DA21; Mon, 9 Sep 2024 03:55:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4862168D9A5 for ; Mon, 9 Sep 2024 03:55:02 +0300 (EEST) Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-374bfc395a5so2139910f8f.0 for ; Sun, 08 Sep 2024 17:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843301; x=1726448101; darn=ffmpeg.org; h=subject:date:from:to:message-id:from:to:cc:subject:date:message-id :reply-to; bh=jcoTVLCdc2wIQRvRaRMj4i5mBZWqcNBdxfG7dZGA/nA=; b=cXoY3Xqmktnz3ZLqjTNkPYDC1OiYxjBzQWqOyqq++5fi4TmNw0UIGWp9y+F1BQOGEM 6DeJwu8HwlgZLkEjNHDatFw4s6aeqFk7hdU013RdpyK7L6eMqcZvvmyN5qVD5H8q5K5U OLviUwdYqpfPGlZ/JNsWfz+RJ2SCeemvYzImTbF9iKo03LAjFRqtUKZdQzOax1g/tqCn 9QSUb3tgPlecrYt/LIXW52EowLIUvsffoXivp/9wVV7dkf0vikgpoMuGgpKbbohEfBxa s5nDwrv1KUw3ddj3T4t3d98OdkrcD90rCy6HWxsxn22GAhNuKAjtNhQ51Uc7/2FjetQ5 UqQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843301; x=1726448101; h=subject:date:from:to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jcoTVLCdc2wIQRvRaRMj4i5mBZWqcNBdxfG7dZGA/nA=; b=W2BOr71ilCFnUDKMHJVXSpDeLzZWM7+d3atH0aRxXudXiRVeNXpar7CICTo2XMFgQV V6xj8KQ1bBGJ+e/ce/3MNCRoSCzYXLzWCkIXupm6Y2QkIHfsQAO512MLKd2CVdbW8GbJ aUhVRi4hpFppYH1lR7iSM8pfTB2EBthsvjvLZs+ChfG4EMr5UWu+Kq2N2xOHJJqx/XsW 6vy4C7aTe0l7COoeWufQOusVT0izuWfPplOBAErG9EqBO/YeVg0q9d1DH7MzdH7eZiQW jQGHgFNz83o8ZwBxguRq3v+jhp98PLy2DdIaQt/dQ2lf7GUFaeZlnjtxAJ9s/TpXH3PA 9IXg== X-Gm-Message-State: AOJu0Yyftoc6BuXUdhj3RoAjfYjPJ8MI5vNG/aTzYG0CyxfsE/x5fyeB RrBXEdMnOlHw5ckZ/HxHJMz8GA+CBZq80M4grd9OdMPECBfYV9TYjjksCQ== X-Received: by 2002:a5d:484b:0:b0:374:c25a:f580 with SMTP id ffacd0b85a97d-378885dd683mr5685746f8f.14.1725843301124; Sun, 08 Sep 2024 17:55:01 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:00 -0700 (PDT) Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 19:14:10 +0200 Subject: [FFmpeg-devel] [PATCH 01/60] fftools/ffmpeg_opt: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: TOEc9345PUlW --- fftools/ffmpeg_opt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) base-commit: 7e35aeda03e7feb0ec32b7da63f5091047a9cefe diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 3cbf0795ac..1aa187f706 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -87,8 +87,6 @@ int recast_media = 0; static void uninit_options(OptionsContext *o) { - int i; - /* all OPT_SPEC and OPT_TYPE_STRING can be freed in generic way */ for (const OptionDef *po = options; po->name; po++) { void *dst; @@ -112,11 +110,11 @@ static void uninit_options(OptionsContext *o) av_freep(dst); } - for (i = 0; i < o->nb_stream_maps; i++) + for (int i = 0; i < o->nb_stream_maps; i++) av_freep(&o->stream_maps[i].linklabel); av_freep(&o->stream_maps); - for (i = 0; i < o->nb_attachments; i++) + for (int i = 0; i < o->nb_attachments; i++) av_freep(&o->attachments[i]); av_freep(&o->attachments); From patchwork Sun Sep 8 17:43:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51441 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1414954vqu; Sun, 8 Sep 2024 21:44:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXkHATZriH/lzXXe/FndLftfPoViXz4uje8QNO+YApvUtG/QpC1yoIWDW+LQqZDdoUVBIaf8QkckB3L273nGVms@gmail.com X-Google-Smtp-Source: AGHT+IHGktHLHaN/SY2+8de+i04l7oNjmuQIo+7AlbchwKz43dbqoQkKSFR2iL0Mj1ogUniyZfGx X-Received: by 2002:a05:6512:3a85:b0:536:55b3:470e with SMTP id 2adb3069b0e04-536587ac230mr6677130e87.19.1725857051702; Sun, 08 Sep 2024 21:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725857051; cv=none; d=google.com; s=arc-20240605; b=NPq2hiOlRC5HRtjoMxYJf6WdPkZfhY3xj5S/Z51Hm+asNwOrIQDiLRu8q8x7BJLC8d y0jpJTeu1YexJ01GzW5Kn11kPw0UmiezNakiBDteeBj2kthApmo2VTz1LUvQrXkASKNR J3dbOFePwnebgGLVtK4EQrAwRg1KLAkRTIc3vstaLwNpDLcL0Gm0TuUlkp92vf6ca45O PzAw/TmPSRF2WHiY/NIy9JOOqMMmc8bEIXVMoFqWQGreK8IX6xalv5wJI+G/UxIedBAJ FHa4aQoGvkYsSeW52Tn5rR0bLh7m8Isgd7cLIcSDBDT69KkOzgFi11UGq3/DtfWW72Vq RD4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=qQ1xbLE2z0VVcp40aAOi4POSD/wrOMfe3N3SBtpRass=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=L4CKGaqwR89AsG8R9p86A8NwvpJRCbx1+EIkGyiZ+dul1ZZm+7s4rZQ4vpePFNoqVN dqJhqxza8uzRVUVY1QY8jcHOjiuzhh471Cc6yLqP1vUA36EOsH2N4HXO86pPImeVlNKN BbRPksLai8TIHzw1ZpTAPhtHD9RgCP7YSN1YifsF6MrLiRfSSdElH4LC/BIOgghWDtfV mv0v9/p0a6UY2nMMaBekd5jaQVL3NbFg7iOQqlbdOCoIKGqUuMtYVw+nWa1ppeZ15oyG 0F33zYp2jhLX4EdECyTGuWDscXKIeB2ISNNzU3splX9XC+UooEmxt/C/5FPHJ1s8DeGs p1ug==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=cfQMeyof; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f8f1e10si1317698e87.350.2024.09.08.21.44.11; Sun, 08 Sep 2024 21:44:11 -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=@gmail.com header.s=20230601 header.b=cfQMeyof; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4CEA468D9EA; Mon, 9 Sep 2024 03:55:10 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B5D4268D9A5 for ; Mon, 9 Sep 2024 03:55:02 +0300 (EEST) Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-3770320574aso2246396f8f.2 for ; Sun, 08 Sep 2024 17:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843302; x=1726448102; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=rPUDh2bWVkQ+r5DmKjMg0c3kdW9JxOzyXLCx6Hn1ulE=; b=cfQMeyofH8kVAZPbdl2Q5ea2/nL/EGkvcl2/qNWxUmJ/NalW0EOpcGhlzKTGWR5AMC EyiIwbRqzYAl2bR+oSI7CuJEYHruDIhTKXsQLuPnTZDqCQ1+8SPwXJCe9H0VYMtnHj3C fRHTOv8fyKXl8ds4t4rGYiwteBSuVXmTCrRdcB6qAywIALmRL/Ic+n9zdJ9OBJpu3XG9 /KJlndHLmK3FkLEIIpO25drZredP8mys9h9d3NZPWJ5VcXYxxaQMLIi6dFFZxKRsUbEu pCJLYXBt7yritpwIFBZYVm7+MRXME3FBZbSgxBY61Xjkti2UJIjTk/+ym/UbEiPQtclZ kLPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843302; x=1726448102; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=rPUDh2bWVkQ+r5DmKjMg0c3kdW9JxOzyXLCx6Hn1ulE=; b=EVsIIbf2iE2gTdWmQwsuGWEi3zN6OesJyMcO8y2qIWNm9lMI/zE5QYyfJJigyj36fO qd7vEi5vGJF56Wzh4vhKsiBfTVQ/+2WP96dYAQiWi1/CdQyOpLlHV5Q5VOHFc5aUvpzA DpA+NilEZPH8L0CnI4dwn6w1ymuZgmAGa8iUwXTDzJzZ4FR6lJQPUvfEakdl8Zr9Jdoj 8CUlVVMpS051t+o71Z7Kb/a/v98Vh6C2xqcPxyu3qKzfo7DRj3oC5/e1omFcjPDlJ83R i9+AxB5tmpaHSXtCLg5frWPT29wkb+dstmqJOQDwpCSzqNDdbFa//c55QDtbZOZuF1S8 dSpg== X-Gm-Message-State: AOJu0YxDuPoYeCb+QuXtI04uO0iAHyYk52WSTV85JXWF91DXNk7pzgBn 26AF2BNztKlIJzH1l/FzuNAQLDGon1F7abvXfu+YTBtnIpeeWbaHkhL+Ew== X-Received: by 2002:adf:fe11:0:b0:374:c1d6:f57f with SMTP id ffacd0b85a97d-378895c2814mr6320209f8f.7.1725843302096; Sun, 08 Sep 2024 17:55:02 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:01 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 19:43:27 +0200 Subject: [FFmpeg-devel] [PATCH 02/60] fftools/opt_common: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: EGaESzMxUUjW --- fftools/opt_common.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fftools/opt_common.c b/fftools/opt_common.c index 9d2d5184a0..059f7a53d2 100644 --- a/fftools/opt_common.c +++ b/fftools/opt_common.c @@ -553,15 +553,15 @@ static void show_help_filter(const char *name) } #endif -static void show_help_bsf(const char *name) +static void show_help_bsf(const char *bsf_name) { - const AVBitStreamFilter *bsf = av_bsf_get_by_name(name); + const AVBitStreamFilter *bsf = av_bsf_get_by_name(bsf_name); - if (!name) { + if (!bsf_name) { av_log(NULL, AV_LOG_ERROR, "No bitstream filter name specified.\n"); return; } else if (!bsf) { - av_log(NULL, AV_LOG_ERROR, "Unknown bit stream filter '%s'.\n", name); + av_log(NULL, AV_LOG_ERROR, "Unknown bit stream filter '%s'.\n", bsf_name); return; } @@ -1205,10 +1205,10 @@ int init_report(const char *env, FILE **file) report_file = fopen(filename.str, "w"); if (!report_file) { - int ret = AVERROR(errno); + int err = AVERROR(errno); av_log(NULL, AV_LOG_ERROR, "Failed to open report \"%s\": %s\n", filename.str, strerror(errno)); - return ret; + return err; } av_log_set_callback(log_callback_report); av_log(NULL, AV_LOG_INFO, From patchwork Sun Sep 8 17:46:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51402 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1356534vqu; Sun, 8 Sep 2024 17:55:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUlfQuCzB/dzZD8EVx5K+fK/qgiY+ZGt5+ePuACbtSNkPrd6156Nx6fx6AIv8APk+MSHuA+k4V2NSafJuHRFxxE@gmail.com X-Google-Smtp-Source: AGHT+IFp/pLkeV5cdFhqqfZ9Kh0HBcVpxKAV50StZpMTk/7b9UCIt0DnySZo3d3x3A/aWRVixxgm X-Received: by 2002:a05:6512:2243:b0:530:b78c:445c with SMTP id 2adb3069b0e04-5365882669fmr3085937e87.8.1725843336736; Sun, 08 Sep 2024 17:55:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725843336; cv=none; d=google.com; s=arc-20240605; b=Cy45A2/iaMnq3KHPt/5t1KUUikWnMkaC2xeb03A+tj4VpnSN6F9EORnhDxyGz/fJ8X 8Ig4nOVhwyCApPDaXziMXDwbGaJzC7h5LrGPKtgmVsf5zxD8Ar/EG7pHUa34xMpcVl5n /OBFJcRXiCqV1g6xekG+NryTt5VM8epVxC1jjVY0gxg3d0nnUEnLYt7iFcDT3X5SABPT dh77Q9poBQfg6dljABmaJSr/OqGCUd/uxqjfn5oAFve0KXi9AK452C9+W4JXfUMYSc9R DvylCbo+glc31WuXn1wmj0l98zwrLwu93yAxshja134huBXBbz0iSbfP1yRcx0XIwXQe /7cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=FWbKKqxR2B/IuDQbGG7NR0iD3M+jLTCbZfW+VdbQqXY=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=c3xLMQYLY1R6ZQY8Y/oxcB0XoRKS+/G03CezmXxLS4BqC6IHDB8/SiJAy6AaqWX+fm CXToAyy6s3WyrwYzPBXbw/53NAPz45LRwIu+i05UDg5UBIy9INgzDwq+HKA9dZn6fn0M JnLyvbiS1bSwKD96TxeZpZGaM21exwTcWUujliOj4C0kg5Hngwz6HDbCzcU63znqnEsr 5GXofFBJEIuDvM0nW6Dkhwp+7jZrWimS4MZBalap486GskPT5os6xyIiiDldfU+YjWI1 u9b5xQouDPLfXYvzD/bUMmsbNzFq1KyeBOipQulE4xZdqETcXI3y2BZl/C446WUs4WVm wo7A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=DwRbzkfc; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f8c1603si1195287e87.214.2024.09.08.17.55.36; Sun, 08 Sep 2024 17:55:36 -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=@gmail.com header.s=20230601 header.b=DwRbzkfc; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BDF8268DA78; Mon, 9 Sep 2024 03:55:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7C0FA68D941 for ; Mon, 9 Sep 2024 03:55:04 +0300 (EEST) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-374ca65cafdso2322214f8f.2 for ; Sun, 08 Sep 2024 17:55:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843304; x=1726448104; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=yWWRabbGVi/6/50N8JgmTP3iCfSWmM/NqiaP8rtFXa8=; b=DwRbzkfcqxObowO1EyEtuOong+h2KxWYALQvC7UwCZshc0tkZ2mvXZhdmLWr5C/e43 kbKlV6XyMdrLBORuPB3H0LqAEXsrb4eLHew/rxhQsI2URqGVnD1b7axZF0sry2/w38Sr hZM5mZSE1H2i30B26myuFsgMLnjt6w5RaYzxS0zWh9g2ePAfmsnSGBXowj3hwGoPTgYC WRKOpyZTsvPGEKjJ8J7mYwMsPBjUJ2+t91bZ7t87GPxD8TzaEpX31jfQAfH1qp1ohwNJ IYYIfHkKnOUAT/Y9ypioCDpSt/p9Xz84VhHtCurBZ3+LBtt44hqvqo5R1z0paa2jFMRJ BIOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843304; x=1726448104; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=yWWRabbGVi/6/50N8JgmTP3iCfSWmM/NqiaP8rtFXa8=; b=ipyK9S1OIw6OcEJ6qRdPaer0B1SYx/URPA1kBhokrYMCQFVSkKpRybKV3AA2A3rdYL CgTUVCYNcIppI3frELnpHK5yWpzoL+vj5Zw5HLama5751ZoC/cq1GQcQ4v95TUubl8fW pRGG1Ocu1mQyvy30HGMxM6ed/Pv25n4OCbbWK1GJ9DLPBq7cYLOWwsmWeEiPFUOxsqBH yrjdqCWaWMzX1xhS76PklFKWprTlQ9mzYEzSuLq/0eMx6LrpQbunx1q3zTn4BCX3RUkb s2uEQURTTAaDKGeDnWHOr5Y9k4wSLjzJkVMtSM5zGDs0uY7tLQmCgyTRCX2i+wMeIRsO sSOw== X-Gm-Message-State: AOJu0YxrhV6Xm3SatMbN6qIhUo2w7MrsMGcOB/erChu2vOw6YpP0imcS HJUPXHIJUGZiGGYoKEkFl3qM2UjwVwrq0v8h/Cb5HrTgoc0e/nDOdMDIGQ== X-Received: by 2002:a05:6000:cc:b0:374:c269:df79 with SMTP id ffacd0b85a97d-378949f7e28mr3438268f8f.22.1725843303024; Sun, 08 Sep 2024 17:55:03 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:02 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 19:46:13 +0200 Subject: [FFmpeg-devel] [PATCH 03/60] fftools/opt_common: use av_err2str instead of strerror 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: pIsJC2F6MTtC The strerror function must not be used here, as the error is a AVERROR errno, which depending on the platform no longer corresponds to the actual errno that can be handled by strerror. --- fftools/opt_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/opt_common.c b/fftools/opt_common.c index 059f7a53d2..dc5fc7b96d 100644 --- a/fftools/opt_common.c +++ b/fftools/opt_common.c @@ -1207,7 +1207,7 @@ int init_report(const char *env, FILE **file) if (!report_file) { int err = AVERROR(errno); av_log(NULL, AV_LOG_ERROR, "Failed to open report \"%s\": %s\n", - filename.str, strerror(errno)); + filename.str, av_err2str(errno)); return err; } av_log_set_callback(log_callback_report); From patchwork Sun Sep 8 17:50:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51403 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1356567vqu; Sun, 8 Sep 2024 17:55:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUgrE5UVxVfYqT2Z2Ne/P1KTW6RJ2nXnmfnzXt1poqVUOhtQ9IEa9RgkW6j9rOrcZmeje16dfpGU5m7zsX7zQPu@gmail.com X-Google-Smtp-Source: AGHT+IEFvB+Sbi3jp3Rrk+7B8bqmmvvT7YDbZSTzPcJdmt74TPyp6V+psf+6nhsYQrVJw6BzxP92 X-Received: by 2002:a05:6512:33d0:b0:52e:934f:bda5 with SMTP id 2adb3069b0e04-536587b0670mr6160664e87.21.1725843347868; Sun, 08 Sep 2024 17:55:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725843347; cv=none; d=google.com; s=arc-20240605; b=Dv38SuA/C8g/DnHJy3KX9flnS5jbnB5Ffhq4NLvl25r3s8iZwXvlbVaYFM491Rmd47 hGALkG5DMbRaCexUN2j8ZWporVOHQqaqvKjUocKulh5Ku8lTVd2ttSLyi0EdB9qgrkrn hsttuJ1czvuCY86H6DPZ/VcKyEA3o0Swd5npduaT08G2g4I9QNXQX5lS1wHhu9QnET7K ux0UrOrN+nTnJz1sGk5pMWALta1t+HHkALJrKHkF0XyZy6sHBurtTChNsZ9syz8jtpCk 79veg6dH+f7P1LG4SrXRtFsF1CWccNsv8bvF/zLJlW8luv+8WEoEKsmxlt9GojbWknZQ GsuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=Kc6SFGE2x17BaT+DYISmiwh7YBxMl0uMatKH/YfJOHI=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=YU+H6B9GVoSMdbPbNvNfqnxE+UFy/m4YLTAJKbQE8scwK/7yjMaXkIVKZ6Be3bGYj1 NNsKdm/6ftpBTnSNPTJzGah1921PvVYt42qzE48waed9/icSnP0TG2FmRRYl7OnXDNfM 4llczy/PBG7vcmLVOhLZymLrK7lXCKFf2IsvhV3KUkJwMGoBwaLuZSSPDRr8p86BiXPO 148TThuyiyWnnokJvvj1O16sl7q1HMKON8zOKfUw/AeLH+i/LcHJK3lcaExsucfYIknv S5uy08pgTdfqKe+IOQWAYmUG4klQhzvKw0D3stBilIFgW1FWjRL85Y0O4FR00EFtT8yy S4Zg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=fzveYpsd; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f90b4a3si1283492e87.473.2024.09.08.17.55.47; Sun, 08 Sep 2024 17:55:47 -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=@gmail.com header.s=20230601 header.b=fzveYpsd; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E995B68DA9B; Mon, 9 Sep 2024 03:55:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9E2C868D941 for ; Mon, 9 Sep 2024 03:55:04 +0300 (EEST) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-42c79deb7c4so31988345e9.3 for ; Sun, 08 Sep 2024 17:55:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843304; x=1726448104; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=2u8TRhXqo6dVaORcpNA73TSr4J/dK29snPZYXvVZH5Y=; b=fzveYpsdjKijLQuhOlv7ES0weMfVf7oT2dF6urmqJaPCYTDSbIjKx0aIAz32BTs0+n MKdgRnSQvqyrHEka2eT1qY+LLm0SslyL/jX9DbcmX7I4K8gVEEiknQ6BqWmY9CqRcbT2 Jf0B2Bl3Pxtc2WcWsH8JOq/oq3kbOpscNSYFuv2gJlKwQWVzwJVRYAAXSBjs8mwglHUv NvL9Bg8TecSnI401SjhP8orzpZlJvcYAVSaWES4ceV3Ltf+U0pWYInhHAfu84h0M+ths sEdeSDGR61VQcsyi2kRX3U5EW8BO2M0l5vpAVFyc3zB8PJG47gIxa5I0OLiawP0Bo4rV DReg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843304; x=1726448104; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=2u8TRhXqo6dVaORcpNA73TSr4J/dK29snPZYXvVZH5Y=; b=pLKss/457kG/v8pJa3SxAoYrZVY6lKT1LJt2dbV6U3OmvnFL211uSPrTyM7N/8p+kF 97hx2nWP5rTUBGL8XROlX1VclZXNHGti/71fBLKphhkjWPODAxDKeV89jxnYxifbvpPw 67ypEERpzzb69hdvGqbJyVVy83s0NYa8ZDDycJAk/X7yf773PIbcg9GZPy72QG8yaZ1B t/nY17i/apa4uhwqaVeZc7iaaY5msvdCZt9SB8thFXbKbXu8lb6Mwl1XIatip9l53wtK 6pxgR/O8McFEsLAw2OxxKbLIbUsXoiR1Y9aJhDCucKgy0kpJALNbOl1VN798YfU88lXH iMoA== X-Gm-Message-State: AOJu0Yye3TPWB6J8Ul9h9EOP/NX9iN4X+PngyeIawXqXYXjVsi/u/CjA u34WxmzO6FAkejhHKEBjeq7b4PMlkcpt5NQX0/6lFf7TYufUZaeFz7jfIQ== X-Received: by 2002:a5d:688f:0:b0:360:791c:aff2 with SMTP id ffacd0b85a97d-378896a3f79mr6503500f8f.47.1725843303924; Sun, 08 Sep 2024 17:55:03 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:03 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 19:50:46 +0200 Subject: [FFmpeg-devel] [PATCH 04/60] lavfi/vf_ssim360: use av_err2str to simplify code 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: SBmJBw3jlKZ7 No need to explicitly specify the buffer here as it is only ever passed to av_log, so av_err2str can be used. --- libavfilter/vf_ssim360.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavfilter/vf_ssim360.c b/libavfilter/vf_ssim360.c index 57da2f3938..68bd7b4d78 100644 --- a/libavfilter/vf_ssim360.c +++ b/libavfilter/vf_ssim360.c @@ -1320,12 +1320,9 @@ static av_cold int init(AVFilterContext *ctx) } else { s->stats_file = avpriv_fopen_utf8(s->stats_file_str, "w"); if (!s->stats_file) { - char buf[128]; - err = AVERROR(errno); - av_strerror(err, buf, sizeof(buf)); av_log(ctx, AV_LOG_ERROR, "Could not open stats file %s: %s\n", - s->stats_file_str, buf); + s->stats_file_str, av_err2str(err)); return err; } } From patchwork Sun Sep 8 17:54:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51404 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1356623vqu; Sun, 8 Sep 2024 17:55:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVfe1+naC3bx9DYfZY9qq6cUp5zHcjBQUfuDQuiyhMwO5Syknl/JiTQANDRODYLA/77GyFbqVMNfKv4kxpuwAga@gmail.com X-Google-Smtp-Source: AGHT+IGVDeRmHYJM8ozpXUg2WYvIXae1530ExT83ZNRpJ/HBPtnwS9wDUlxnjfUKwK0/BMV53Xuf X-Received: by 2002:a05:651c:541:b0:2f7:5c23:98fb with SMTP id 38308e7fff4ca-2f75c239929mr13524031fa.10.1725843358187; Sun, 08 Sep 2024 17:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725843358; cv=none; d=google.com; s=arc-20240605; b=WDuGi36PgqRhuPuA5oREjqUBIynH51HJPf3fPTeimn+mjzC3/VUEhp6+3rzgam5v5a zOX6x5Xet+w68quAk3q1IY42CkZFg6SH+HqRfYwQTQvTUj5lCeFhPq/RF4B7qKIk2Ph1 SglH7tMU2uGiLX8syK9WMoCsnQAc6nr11eD1e7Gq5PSfhafnWIFyVGESyDOCdT4/KmCC ZGhXwhkvd5T5O0r5H6bheD56k3cNYnHDnYCTr2T0jguRPjkibNI81h9aqmjBnyys19J7 3RN8IFBoTBo3sO0Z3zINbfTQDZdgqwCwpdcoyAM+3hjA+3DCxjq3R9EdWqKlXGKXpznx Ue5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=p3XU0inhxIfwxQ2MVBFv3vkhBer/np3t2cXeInt1kvs=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=IdMPQa1XwQ+el07FqlvfrK7bXcc2Od2MhNQBqjld8f423PeiEVljNTA1lZ4w0uC4Xz SDT2WknTGDoYIO9X1QryVkyoM0T+UiSjdR75ycHxT0HnA3nyDdjofGsx28G/bz8lk9PB k+dQvndDE9d7vT+FW28SuGxLjBmzfFvIbiKoR+Oaq01q33KiatuTAYVD1uhHsFaxvJjs vUG7qjCXY31SYdi0prZV5dsxtkL/sjfJZWmFAsr3JIwKkj1nyDQvyh5e1WRvk0ngK27U wZ4b/InZfsgknd2ZwqAT5hBacAPxsrUeEjlawKUHpxqSs3LtNBhljWoGBiRhfzzW2s8U vb5w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=DJbBB3xh; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5c3ebdab800si2753019a12.581.2024.09.08.17.55.57; Sun, 08 Sep 2024 17:55:58 -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=@gmail.com header.s=20230601 header.b=DJbBB3xh; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3344B68DA58; Mon, 9 Sep 2024 03:55:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 051BA68DA3F for ; Mon, 9 Sep 2024 03:55:06 +0300 (EEST) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-42cb6f3a5bcso5847655e9.2 for ; Sun, 08 Sep 2024 17:55:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843305; x=1726448105; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=oot+dOhMwATpzhWEvgHb6Cux3zX5uv4TBhEyrEZ960k=; b=DJbBB3xhvl7tPMUbOdxz3KL/j70k6ZlvWZ7zqfwnt8sjsb53gVC48mylMfaRZBcusy EHhVjLOn6J80CX2Z7ToPUImmNUh2pxjL23R3ZtVBRvqClJW7BjMOpfCH/+33CAaa/1JZ Gs58Nzi/uOBHG9MQtlnEP/FK4eq9nTa58pW6LPhzz6rvdUE7r+FLFjZJZLek/AEg67RU 6HFINfjFiV/HuxrO4mz/xyiwn7Fa+lCzPaWC4/yFbNTEVaz7I09uCLvZnscobNdxg+E1 4zPeZXUv1K/bqDwvS/aAohTRqLIEY30tcFtZhqPWKrl4L4nxeq+E461TUBhyOLaMuB51 tNlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843305; x=1726448105; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=oot+dOhMwATpzhWEvgHb6Cux3zX5uv4TBhEyrEZ960k=; b=Ov33u4ZOXfo7HfHBQl933jczikjEGKoSRJXSFAiplhY+sEWhS2m6N4KZAyLL+mqwnL zy2fISdBV0ENKGOikRPnZ00k3Gq8JA8hEX+rGzvKzwwEs/I1ascqg69IPCpEeEpvkCQB yLWzPuaiyI5mIwaPCIpme0h3yhJs+1dqS6uJMU+3YwBD63zoL/F6JMAIrv3o4+uMGoc1 zc/n1sv04B5BuUFBKvDGo9mFCY2nV1Jo87CZb2vgEXgYJ6ox9UXeGo8Aj8wD26msam5q uxpYzWqM9Uc5YiWqkHHESGtraMZvuN3XNuPlw9U/GWsb7wiCkLu24RkWNhDs+JCWRSNa gDOw== X-Gm-Message-State: AOJu0YyVbOatnat0KSBDltPFjcxCn/5ek+57GVe6YLwxfJum1FpLD50u rzmXui9FWjpQIc3AeWxP4yY+jRJgB23KajRHRvjybEA99OmyIhP/EQKyBw== X-Received: by 2002:adf:a457:0:b0:374:c318:2190 with SMTP id ffacd0b85a97d-37892466d2emr4653308f8f.59.1725843305264; Sun, 08 Sep 2024 17:55:05 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:04 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 19:54:47 +0200 Subject: [FFmpeg-devel] [PATCH 05/60] lavfi/vf_ssim360: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: HyHFW0ZyIZwj --- libavfilter/vf_ssim360.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavfilter/vf_ssim360.c b/libavfilter/vf_ssim360.c index 68bd7b4d78..42632bcd85 100644 --- a/libavfilter/vf_ssim360.c +++ b/libavfilter/vf_ssim360.c @@ -1132,7 +1132,7 @@ static int do_ssim360(FFFrameSync *fs) AVFrame *master, *ref; AVDictionary **metadata; double c[4], ssim360v = 0.0, ssim360p50 = 0.0; - int i, ret; + int ret; int need_frame_skip = s->nb_net_frames % (s->frame_skip_ratio + 1); HeatmapList* h_ptr = NULL; @@ -1153,7 +1153,7 @@ static int do_ssim360(FFFrameSync *fs) return ret; } - for (i = 0; i < s->nb_components; i++) { + for (int i = 0; i < s->nb_components; i++) { if (s->use_tape) { c[i] = ssim360_tape(master->data[i], s->main_tape_map[i][0], ref->data[i], s->ref_tape_map [i][0], @@ -1191,16 +1191,16 @@ static int do_ssim360(FFFrameSync *fs) // Record percentiles from histogram and attach metadata when using tape if (s->use_tape) { - int i, p, hist_indices[4]; + int hist_indices[4]; double hist_weight[4]; - for (i = 0; i < s->nb_components; i++) { + for (int i = 0; i < s->nb_components; i++) { hist_indices[i] = SSIM360_HIST_SIZE - 1; hist_weight[i] = 0; } - for (p = 0; PERCENTILE_LIST[p] >= 0.0; p ++) { - for (i = 0; i < s->nb_components; i++) { + for (int p = 0; PERCENTILE_LIST[p] >= 0.0; p ++) { + for (int i = 0; i < s->nb_components; i++) { double target_weight, ssim360p; // Target weight = total number of samples above the specified percentile @@ -1218,12 +1218,12 @@ static int do_ssim360(FFFrameSync *fs) } } - for (i = 0; i < s->nb_components; i++) { + for (int i = 0; i < s->nb_components; i++) { memset(s->ssim360_hist[i], 0, SSIM360_HIST_SIZE * sizeof(double)); s->ssim360_hist_net[i] = 0; } - for (i = 0; i < s->nb_components; i++) { + for (int i = 0; i < s->nb_components; i++) { int cidx = s->is_rgb ? s->rgba_map[i] : i; set_meta(metadata, "lavfi.ssim360.", s->comps[i], c[cidx]); } @@ -1235,7 +1235,7 @@ static int do_ssim360(FFFrameSync *fs) if (s->stats_file) { fprintf(s->stats_file, "n:%"PRId64" ", s->nb_ssim_frames); - for (i = 0; i < s->nb_components; i++) { + for (int i = 0; i < s->nb_components; i++) { int cidx = s->is_rgb ? s->rgba_map[i] : i; fprintf(s->stats_file, "%c:%f ", s->comps[i], c[cidx]); } From patchwork Sun Sep 8 17:58:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51414 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1369559vqu; Sun, 8 Sep 2024 18:39:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXxILE44UjVfKpYN7mXUAAUIrc3zM2SD+nFYGCUhS3lKRiAmTNCcDX2fGq0Jpupts2yBTd78BHQwMDeoPu6FkDX@gmail.com X-Google-Smtp-Source: AGHT+IFuPGHMc2+f0JtEvZDdG9ZeQnQwXNHlxeztgo/P0/TfrxcLccuTIdo6a592eNszL4kVl0Y1 X-Received: by 2002:a05:6402:3202:b0:5be:fbe7:11ac with SMTP id 4fb4d7f45d1cf-5c3dc795f96mr6784831a12.20.1725845951928; Sun, 08 Sep 2024 18:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725845951; cv=none; d=google.com; s=arc-20240605; b=dEKMZ9HxGAqn9OJ6mH2RsilJn97nLIoPqjeI1gq2qbyFtOU+9CB28RnlMhBuRp4dHG v5EOu8YYHabhIKZgFo/n6a0qjooWVd8uCIYdcD/zSO0PIW9dXvVKuwyL2V2DrkhbZkeZ oSvYNFj5FKmdROfRHW3sthcV0NJbBa3Ojxa+91lCmCo1IRAKVMZsXuFiANTYrzVEb+Ne EFl/uhpwEP7n59+gcx7hNHVZhuTOeLSYoh5IuQuLr1MzoQvJwRJrOFKBPega+DoySsMu hl/faEq8x/tgObaDJV/+PRIEbbB0nJa7+qrY46zTbI4BCS7zbzZpdB4n1d0HfdXQqb+z 3HRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=fQQF+AzWyAnNkiEsIabO4ip05q7AimMpGzomgQIZ8bo=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=K2l/bl9wOSPDVDR+snjgJbniaRHCQoI/vuxaywixkXaY+bMg3CINtAW458mV6ZVG1J i+JLvJ0yzjDmtCHl1D9dU+WL5vPVAvdKdp+F4YwGeddHRUXFHFe9QSm5lO5WuNMWEdGj r454TruL2YhpfcXxy7r2u5i1v81f0QTKHSC2OoWJkZ49UjBgJG0KlL7PfkQe2eMAP6HG 0XTyOnsjAfLB6q5DWTIo+W1A2OK0SgIkF2KKOVBWZ5AMQTseefYFLHTfyl/vgrrtSxYl BXRCUNHINJrpT+C25wycMUM8HUQ6PY36ft/O18b2CXABVBg6bBW+EiTF4g3B5gfXUWb4 H6TQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=Xl14pk29; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5c3ebd42ac2si2860284a12.97.2024.09.08.18.39.10; Sun, 08 Sep 2024 18:39:11 -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=@gmail.com header.s=20230601 header.b=Xl14pk29; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B215068DB20; Mon, 9 Sep 2024 03:55:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 07B5968DA73 for ; Mon, 9 Sep 2024 03:55:07 +0300 (EEST) Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-374c7e64b60so2179393f8f.2 for ; Sun, 08 Sep 2024 17:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843306; x=1726448106; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=erOFddcPr0/eczV0adc0hMQqgWS2uwdPJomMm6JIFpg=; b=Xl14pk29Ch77C6SU8krtS3ci7W+1s9ApmzNbYNjwSF7cL21/iLhQJ+UQ49iv4LfQJa wtOAKhbwMQ5UBolCjdc1UGo0nNv/xqzsPtxymuvwOTekqUm8FV1ZVYI4eObuwD2FM3V7 2zb8KKoKjaDswzXhoJZ/ExMcVaFaXx+GQGsMWZYL8aNslEONiM2I1/FdDm27mob3PzLa SSkJvmUuJX49liXsS1KWEJctUk2K446fcEudn3N1CI23doZkhOpeHslPY8FM0BZAo3Ww cvrcCoYcO6u9GDquR3gDvzpwc/yP8BytkNtsIIx/qeqOQ7VVZKo+ypshaozCtALhplkn 3Yug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843306; x=1726448106; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=erOFddcPr0/eczV0adc0hMQqgWS2uwdPJomMm6JIFpg=; b=tf/kDwWHClNzLRsJIuLbrahF3QWSEhUyJD62JgYoJrOW5jQnuz58BVmT7mr86hs2AQ kkjkedYp/rtOrLcQHTbGHhQG4cG7b4T4O1hifbtJsWtaT35GyZIRaOKWRwBaW6ZluLyT Vg9tjIkCjjk9l+L//pXEZ/AHvhnJHulBNPWbWDJelVUb10KHZ8hZxyURooAW6QFD0har 2CjKPji81cUFpWidZa6o4um+HQ0YgTQLH+JOsIWmmD8s16dO9UsxisneZGPKXYsulf5r lt2fanv79onVdmz1XYhWJsGd/0WTp20UlccAgyYD3KCQBKdlzvD86/XPTVQbulvEzzuU vf3w== X-Gm-Message-State: AOJu0Yy12dezvuifX98E+4vDPHkxPL7ZlFk/3qaTtnaWwfi75LhnboZe yu1wFoR6ex2qpOea1Pp8NsZRP0EZZhcBvF+ydQdfBW+FAA2W5mSAzAyohA== X-Received: by 2002:a05:6000:b82:b0:374:c7f8:3d52 with SMTP id ffacd0b85a97d-378896c86e1mr5495517f8f.54.1725843306303; Sun, 08 Sep 2024 17:55:06 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:05 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 19:58:16 +0200 Subject: [FFmpeg-devel] [PATCH 06/60] fftools/cmdutils: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 90qY3oOgpY7p --- fftools/cmdutils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index f725c31c12..a9a7ff4194 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -802,7 +802,7 @@ int split_commandline(OptionParseContext *octx, int argc, char *argv[], while (optindex < argc) { const char *opt = argv[optindex++], *arg; const OptionDef *po; - int ret, group_idx; + int group_idx; av_log(NULL, AV_LOG_DEBUG, "Reading option '%s' ...", opt); @@ -1366,7 +1366,7 @@ int filter_codec_opts(const AVDictionary *opts, enum AVCodecID codec_id, } int setup_find_stream_info_opts(AVFormatContext *s, - AVDictionary *codec_opts, + AVDictionary *local_codec_opts, AVDictionary ***dst) { int ret; @@ -1382,7 +1382,7 @@ int setup_find_stream_info_opts(AVFormatContext *s, return AVERROR(ENOMEM); for (int i = 0; i < s->nb_streams; i++) { - ret = filter_codec_opts(codec_opts, s->streams[i]->codecpar->codec_id, + ret = filter_codec_opts(local_codec_opts, s->streams[i]->codecpar->codec_id, s, s->streams[i], NULL, &opts[i], NULL); if (ret < 0) goto fail; From patchwork Sun Sep 8 18:01:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51434 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1396468vqu; Sun, 8 Sep 2024 20:24:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX6tYRvlxfnHrLqLjwqMqO1W8IyQuXRyg+HUavKL88qplaVY4fplS59orl0eOS5pdIK0TwghNB5J5FnWTGch4MI@gmail.com X-Google-Smtp-Source: AGHT+IHFaZ3H27DPoPwTNw0KVHrQITVguhp2ZcjNGHJQaMr7toY7M2VgZUeDGTKI54HmUY+ssXtw X-Received: by 2002:a5d:5273:0:b0:374:c69b:5a16 with SMTP id ffacd0b85a97d-378896c8058mr6519233f8f.50.1725852255027; Sun, 08 Sep 2024 20:24:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725852255; cv=none; d=google.com; s=arc-20240605; b=P+NjBVicrriaMBvK1q/6McVU04qY2j+yGPFENDpmcfhd4tou7GAjfjgVYtlOTM3lzL qLltHuIhRNPqUIVb/mGwNBtEpdcR4S/ZzTqnK53CSdsLmzq28VW805NczEkHIDgwM81G 8B/cGuFde8qhw8vmKL5lc9LI/qxm2G/OmHVwg/SqIJTzA5c426mqRfpRciqbtx+jh5IG Ee/fA5KI71Z/vrggklzArxyDqWXg30F5A2s++0D91C4NXJl8fvxna/2rju2rv2IaJz82 xgRjlhfcKgNxpkHpgl8hEidIK275y/o+ickMsj8GpQtjUchRYQzYR/mKdOPunAW5t5c5 hXxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=e5If6grDz4JtLmJxK4RVWgwA50zpSYKwYIXfypd8TnE=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=NYlw/G9AssahZRBpN6fcs+68KQheRkVHD9QlN13JFjwJY0fZd/p/Q0+ct48Cwe/4vJ IZWr2RdkCenog1/1Upg9037uBhDvhZMMjMGtDD1PsvEP8lepEtQbeSftwIhiDiEH2u6V cb6Iwt0jfF66fnxsA7CqkvH7Dfbrq121Z+hiYHPde7C3JODZU7Ae/2wzWMdhXZ1r3anc kT/1J31cDTDYwN+b7EHGWASaghhKzJG99fwV/rAhj78PMkFA83piB5QrdaYiGwcIdD+r 5ivMKhHmsl402qEHWYKJ0HX4tIQ/F9+6YQaJeD8Dt1/Wh8hH/r5vnhspYE6NotujqRTR LVEg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b="Ioot9d/G"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25d8e9d6si325907566b.895.2024.09.08.20.24.14; Sun, 08 Sep 2024 20:24:15 -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=@gmail.com header.s=20230601 header.b="Ioot9d/G"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7012368DB8F; Mon, 9 Sep 2024 03:55:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CD9CE68DA9F for ; Mon, 9 Sep 2024 03:55:07 +0300 (EEST) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-42cb9a0c300so658065e9.0 for ; Sun, 08 Sep 2024 17:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843307; x=1726448107; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=bmgaHAOhUaJTnYGjC0LD38C6Dj6XO0i8Q3lPg1FU4X8=; b=Ioot9d/GbRriifQ3pIJwuqZedtZjyqQSs89tK36hsaPy4iqmoMKS93hVkiRIrj7MIo 3tO7QpFOrLED6I5YXuJ4io8jmuTW8oMNxszJh7IQClksar2wRiB6XOXGkSIPM/a/HEBi FT+KKBQnWnKYmBwKYHb4yBypu6E5RIwEnWv+OrJGD0rHtzEDeafNoQQd/WoxzmDL6MsP VMQ8guvgLR7zsnyZrh5qPH/CbaVKktSQ36QAwIYIXKhAOaDGYcR1MQEY3fexmTLvG4Jh pTfcSZhdXfBxsJR0l3jobOy7LVLmW4UjEKjWpUr8HhQTlH3jgmIWqPmG6Hc5yTNXu96s /zMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843307; x=1726448107; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=bmgaHAOhUaJTnYGjC0LD38C6Dj6XO0i8Q3lPg1FU4X8=; b=H327PtJn3ofIVVG0r2GCFq37SGM47HsZ7Ov4ReW95rNFbt1yM5kVla6YDCYB6OXn5/ JVPFRgCnGxqwnge3GNZJIgXXMGfS/iLW274L61dEqCdPHjyIaI2CEISNS6ZqDMo3HCqD /yM7QwR+JtS9Ptjsvqy624W+5Za5FewAbKt2kp3uP7XoAnfv6guFqZQh7dDvJdo7LXoW y8HNniaRLlPSJa/x638a0k/5qZvNGSzEvmkHbXUNofJwWBrGCTlnii/irO7mZBwllFk/ kJ0hiR6bVeHnU/FrHG/sigJGLkR0i2B6GmNRd5rwAE3S57lTaTJ9dbyIqTNZ1dq6Um70 cbRA== X-Gm-Message-State: AOJu0YzYg3PLJgFL6hXv8mtafHS72qfblj78WwwwMYlmwY8GA7N4S7tR Cnk8eUPtQvwgOMUPwrKSJhqYh0b10BePoG/rHcYqL4E+a70zs4XWtaSgnQ== X-Received: by 2002:a05:600c:4f56:b0:42c:b037:5f9d with SMTP id 5b1f17b1804b1-42cb03763bemr36789475e9.3.1725843307254; Sun, 08 Sep 2024 17:55:07 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.06 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:06 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 20:01:15 +0200 Subject: [FFmpeg-devel] [PATCH 07/60] lavfi/vf_psnr: use av_err2str to simplify code 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: u/kCQm7dEigv No need to explicitly specify the buffer here as it is only ever passed to av_log, so av_err2str can be used. --- libavfilter/vf_psnr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c index 1f02811806..4a5db5df23 100644 --- a/libavfilter/vf_psnr.c +++ b/libavfilter/vf_psnr.c @@ -290,10 +290,8 @@ static av_cold int init(AVFilterContext *ctx) s->stats_file = avpriv_fopen_utf8(s->stats_file_str, "w"); if (!s->stats_file) { int err = AVERROR(errno); - char buf[128]; - av_strerror(err, buf, sizeof(buf)); av_log(ctx, AV_LOG_ERROR, "Could not open stats file %s: %s\n", - s->stats_file_str, buf); + s->stats_file_str, av_err2str(err)); return err; } } From patchwork Sun Sep 8 18:02:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51461 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1457083vqu; Mon, 9 Sep 2024 00:14:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUWHZrrCuQ4cf47joWoXA+ac9jFWlLwd/cNhTl7SORw2bHxZrxkqzhBt9sxQD3prdHJLJMdzGAvJXaRySfeS1oi@gmail.com X-Google-Smtp-Source: AGHT+IFS92ncoDW3RVRvT3QmnzYBmuoymkf6S7fsaj0EJHyIntxD2FBFTUol7f7IIMC++wbPa/B6 X-Received: by 2002:a05:6512:2210:b0:530:b773:b4ce with SMTP id 2adb3069b0e04-536587ced63mr9737281e87.33.1725866051686; Mon, 09 Sep 2024 00:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725866051; cv=none; d=google.com; s=arc-20240605; b=MSX3WpTPDftRUKwT7qyP/RN0pRBYi9O/YrcWJZ+madL+IrJqB3N7KMfDVWcVYtiYD9 AgG/ZbCnhYEVnHbOSAa+ViyCkNYnrNJaBXcpBu9WYxT7+Wu+lQZcthZ/DFFEhHXajR8w 4JrhplbzZFjQY7OzT6haktZiu48zMJm7rNBjAFa8LjWrfsnYk7afAlb5DYg7H73oY08t 83bpp8qLcpMFEz3o8KFo6lPjJSgQXH0nga4g69G9tp4Umr8PJw97tpMQfK832QgW6LNZ hPQwi6ezdLD/p04fA2pXCqB/SfIyXuQNOHLQVHUlf2GRtAsNxlrnxzm9cKk2tDkiIGkV yolA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=YARRNsd6sv5vfKLKteDPYBthne2cIrNR/IQVmHwXRTU=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=CL+tL8k9KgcoyQOoCt9mOg6AJY8dhVpKL61BEUoxnpHTPtUfE/2lkV864Y9ssZdYA2 +MZhH0UtlET1WJYbFU656J9FC2Jl44Wbgqn2xyn2SGmYHlnNcli3Aj5fM6q+mFTjWayT c9ivAP7bU/KVQSJxvn1w+UVnYVomwUaf8z53yw0Sl1YemTRFnvjFQuyuUOPsJDMFqcg6 FeKZIlohi9jC9AK7QXX7l54vORou8jpOEWjbh06j6aJAOOS6RUOS9676wknBr3VwT+fJ sZ1BaCU70VUaYDnAWtHg9Rb7J78UhOTTOj7VaA9pXJnEZZw1/2F4KhvuPtj602LOfkC6 Os/Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=VdVKB0Oo; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f8c166fsi1354864e87.295.2024.09.09.00.14.11; Mon, 09 Sep 2024 00:14:11 -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=@gmail.com header.s=20230601 header.b=VdVKB0Oo; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C5ACC68DBB8; Mon, 9 Sep 2024 03:55:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E4E5C68DA58 for ; Mon, 9 Sep 2024 03:55:08 +0300 (EEST) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-42c7b5b2d01so43757985e9.3 for ; Sun, 08 Sep 2024 17:55:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843308; x=1726448108; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=pZwtDHj+DBMjwUG3hIOoPFF191yh/AYjIBenSKuS7BU=; b=VdVKB0OotEqkc4AspHQkQPH253JGs98b3JOv9ZZUnNUdnUe96eMMTrZuoX5HQdZuvp 21kVr6Ja6CwxkcFTd97Xug3pFfd74hJ5EYN8k2/AaBLAfAxdkV/A0B5vOIp3IGXh/G8s 0eSFvP5MN7YXYTcKNhHJjXDjJAGPHKDmPIFOxMLES+WEj3EY2uJBcXShWmP40h9hr+yU rWLeTE7kvTuTNLdYCFfVTKGfVQBNKAvggBcAZGUsWso7ynvXo2di0QuFAOkZLCDixSo6 wRTgRxmBg6QhW31VqRiL8d5m4bxyhh52cKDlEhjO4I6FvmZs6xXxALDUN5rpe4ufkhI2 OAyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843308; x=1726448108; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=pZwtDHj+DBMjwUG3hIOoPFF191yh/AYjIBenSKuS7BU=; b=EAiojsB+34A0hBVRweSWMRre3iWMPvrWw4pZuq0f3Jcf+rF1Dj1grwI9IMheETXxM1 TIce6OpuD8Vc/4vxhQV5iEwaODshX2nSyrc52FVYJG6Gxbur15/71hMkQq0SSfWlKQfb a2HqA0btZX3e9V1b7WCI0iVda6fM14oU825ShIJcf6iZe+xmEBfs7M5UAZ8QlZcGjFt/ K0HpWDVCaU604gjAZ1vcw01yKDCefetRFGBSB94np6s8Qo5sMK4+SSWuLAKfiFLoLNz3 yeYqrVDX3dQS8nuGB49Nafg5U7ikYhJAVA9GwY8603OhOCl0dRrIOCTgh6GXhid3jPva /gzw== X-Gm-Message-State: AOJu0Yw/UaisGrb82S8eNc72ae8aBay9Mkw8DcuMGnA94J7Ms1mVA8Ds IMyrF3YlWSnFP+66QXYp/VcQrh0ybllqPrmL8xcRcsWdHERqPq7UWrhHZA== X-Received: by 2002:a05:600c:4918:b0:42c:a387:6a6f with SMTP id 5b1f17b1804b1-42ca3876ae9mr71066805e9.20.1725843308239; Sun, 08 Sep 2024 17:55:08 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:07 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 20:02:34 +0200 Subject: [FFmpeg-devel] [PATCH 08/60] lavfi/vf_vmafmotion: use av_err2str to simplify code 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: qzNo4GC/sG6W No need to explicitly specify the buffer here as it is only ever passed to av_log, so av_err2str can be used. --- libavfilter/vf_vmafmotion.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavfilter/vf_vmafmotion.c b/libavfilter/vf_vmafmotion.c index 7bc73416e8..f9315e56b6 100644 --- a/libavfilter/vf_vmafmotion.c +++ b/libavfilter/vf_vmafmotion.c @@ -318,10 +318,8 @@ static av_cold int init(AVFilterContext *ctx) s->stats_file = avpriv_fopen_utf8(s->stats_file_str, "w"); if (!s->stats_file) { int err = AVERROR(errno); - char buf[128]; - av_strerror(err, buf, sizeof(buf)); av_log(ctx, AV_LOG_ERROR, "Could not open stats file %s: %s\n", - s->stats_file_str, buf); + s->stats_file_str, av_err2str(err)); return err; } } From patchwork Sun Sep 8 18:05:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51438 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1401127vqu; Sun, 8 Sep 2024 20:44:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVjRfCaO3zVwyrvpJhSXwsTuMNoj27jpp3Y1RZxSJQRBIYU8ASvnCF6BMJ+VE0cgnCyd6nIcrRn4D7vecVyxWtC@gmail.com X-Google-Smtp-Source: AGHT+IHsIzmxo30WC2Z8EyWfTOilgZhWg9CI0QcdFyWOUngFiNqM8lSulWa9Q1Y78ysvR/amK3RB X-Received: by 2002:a17:907:7ea1:b0:a8a:926a:d000 with SMTP id a640c23a62f3a-a8a926ad660mr335655266b.5.1725853451621; Sun, 08 Sep 2024 20:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725853451; cv=none; d=google.com; s=arc-20240605; b=OS+vUucpw7eH+YejRf5xbDcKTQXVEWUzJa9LGNBOlPCbqXThscEpBaXSgvflay7jO0 rh5ZZuJwYfRGwa5VxF7CuTTeBOTJ2ER9mQLb6vWxUQKQOngUN3iDUswF5sC1v5HYLIqU vH3rDxW1jni03epVNGZ/YSUK4BJJEVvz8c35hf11mcJa8FhMAvR/NPP/ARaGEtwWnUKS AypKgQP35ZCOnUtZUkvO4ntyQJfitbUFhSsfEThgb7mQbFEXgEKkZlTLDVygh4wzHyWo RkMNPeX7blsrIv99HDWW21jf+NBim3FOE0P2KgEIL0GXNFp4IhiNnqyLHGIENq6iH/GM Kp4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=E31z1kpMudithFb+cdyGIqBnchB1mNeqIMgBd4fquYk=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=TfX0tHFLS1vs1wGkPfaBpnJHQpLSVsFtaaR/ILIHLTLifXRnXt56X8Jmv+STFTyP5p zsD/VZu1XkN68hAx5/fZZXwkNi+CxsDulW6WlY3PA7K5my6H7iruWjodGy3BtLpkSdTE n93HtPnlyyQUAPHufUgu5+IfaI006piwDsSPEBU+jagnSH3V01u1axS6kdTPamb97m65 piiawbUjFMeqgcA+DuU6Zxypv/GyvqK0q+CFXQI3pZxguiJ/nliZ7CVaGlCQfLsqVqsY 6zne/AAeppkkJgu0uFvOshVIFtUqBWJfFu+JavTsYh5D+7w+/iZCzzO604GMz1EwshU7 XaGA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=OHXPlTLc; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25ce9764si317723166b.493.2024.09.08.20.44.11; Sun, 08 Sep 2024 20:44:11 -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=@gmail.com header.s=20230601 header.b=OHXPlTLc; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6697468DBD2; Mon, 9 Sep 2024 03:55:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C1F3F68DB02 for ; Mon, 9 Sep 2024 03:55:09 +0300 (EEST) Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-374bd0da617so2286238f8f.3 for ; Sun, 08 Sep 2024 17:55:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843309; x=1726448109; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=D8VVVwMQTsnrZdyJHaPqfMRLwB8VcZacMXzLam3I2r8=; b=OHXPlTLcyAJId/1D7k8iC51wavbt3chOIikDp/GckBO8btwvtlUdLCU2uRxUaoKjFd o55RFz/3nN/PIKeRxevdTYaSJMMK/5C+/TwkRdFcSLuonscOUR3Mgg4Y4caeMLSKQmiv PkngiyKITPVqeWxaFwEgF1AwVdRsjcMWImrEXZ2shq9JStvOtJM3aII1Urj9rw1TYDRv FIkJZ6+TNGhecVFXrsXOdorTt68vFmEvQCHWwPTZzwr13ylsMdsu1fLPJik6hIM6O372 qW8QtDeAmhWe1M2ukszuiSvoDT56cfKfK8JhUZlO6+foeKZPsSCbcfsrvu9ivYk29vRp aMoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843309; x=1726448109; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=D8VVVwMQTsnrZdyJHaPqfMRLwB8VcZacMXzLam3I2r8=; b=PEFZsJSpv2kjM2+cW/oNl1Kf3qdsuZFqiSbS+tLXR4CyVn+IccyKNIROT6xgn80UfB YQxVSz4waPNqolLG7XaQoklppakkY8JKC6+fzpyK2ffLhZGVZwD92NwolvN+gFyEt/Yx yqhjJcNgoHzXIYljiLwYTkJYFvKlvxZisoV/qpmSxEHVGvYVe5KOrtxigfgSo8vJ8KIt lxB8TD8nbCHZEqd61Ge8M7djuirdEfo8cSL47AFl1mFun9psS21XFD4JncO3q54LRyPy vmZ/k51UKGqImVjbhkXmq14ND4aFUDnTcoFtlvNUrR9Dp5FskU/ep8OGmFa8gABFafoo Ex1w== X-Gm-Message-State: AOJu0Yxu3fBRA5h0217ynR/qs7chPVLcMhBoTKYo+ptEjVsnc4h8WKP0 nTlF6NwZjdybWshSUfwFjt3i/R0eqRhpOUjEs5rpHthl5DYUjVI2zmeXhQ== X-Received: by 2002:a5d:484b:0:b0:374:b5fc:d31a with SMTP id ffacd0b85a97d-378895de475mr5864482f8f.25.1725843309119; Sun, 08 Sep 2024 17:55:09 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:08 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 20:05:57 +0200 Subject: [FFmpeg-devel] [PATCH 09/60] lavfi/vf_vmafmotion: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 65KaPBCgYc0S --- libavfilter/vf_vmafmotion.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_vmafmotion.c b/libavfilter/vf_vmafmotion.c index f9315e56b6..a8adc67019 100644 --- a/libavfilter/vf_vmafmotion.c +++ b/libavfilter/vf_vmafmotion.c @@ -90,11 +90,10 @@ static void convolution_x(const uint16_t *filter, int filt_w, const uint16_t *sr int borders_left = radius; int borders_right = w - (filt_w - radius); int i, j, k; - int sum = 0; for (i = 0; i < h; i++) { for (j = 0; j < borders_left; j++) { - sum = 0; + int sum = 0; for (k = 0; k < filt_w; k++) { int j_tap = FFABS(j - radius + k); if (j_tap >= w) { @@ -114,7 +113,7 @@ static void convolution_x(const uint16_t *filter, int filt_w, const uint16_t *sr } for (j = borders_right; j < w; j++) { - sum = 0; + int sum = 0; for (k = 0; k < filt_w; k++) { int j_tap = FFABS(j - radius + k); if (j_tap >= w) { From patchwork Sun Sep 8 18:13:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51405 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1356668vqu; Sun, 8 Sep 2024 17:56:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUidYc53wq9jlcUWFy/hPDtyZxbuzmIoweberEqkQ0Lw72uwcgVrO+wcWRWHGaS7K1L33vwL8FPs1ILIAM7gjvX@gmail.com X-Google-Smtp-Source: AGHT+IHeYKK+y3Uw6rnhO5auztqPK+cVA3mY40W+vAwr3O7fBce4HD4X18j5pfwAHY7elYWSWwKt X-Received: by 2002:a17:906:f588:b0:a8d:2624:1a87 with SMTP id a640c23a62f3a-a8d2624259bmr147738266b.14.1725843369684; Sun, 08 Sep 2024 17:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725843369; cv=none; d=google.com; s=arc-20240605; b=JV5L2MNr38rNL0/eXB6J1mu99ij245WkMpMj3t3JjzMoBGMFddDX36QTAidWnmv2f0 h4Lo3tkM1oxWKbhYpTZazTsghcShDDM3o0+q5TshVgFnhcrmrRiv+rPVcIgTK6yFLCPq XIMqCDOJZVLInDjblIrFQ/vupnnnyE//HsQHs7rgZJh5fSZxzpb5nBjhmIWlo+g/+PsX CWQdMddSNd1WrkiPOmyvjupFHxc0i3/NfPHgFB7GA4PrN5izEo63xkjbcyi/hehrmv+s C2Get4oal0kKtlAtcKSZycO63vMkY84L3EzrxRDzyJWtblV8mtplRIDi6D1HH/O/E4+B NnuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=sUGsDTfzE3lqOqUPRBjtaP1qu51Yk2zzT5vJJVkKWoE=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=jj9sI8dcNRlXVQbIuV9ZOUS65hU29gkSa40HRgmz38grj3z4r1sw4X5Nef1Jq9VhQ/ UnL6y63EYjdqgB05i+w+A+ZWd5O6HcV6TU48Pl/lMPOJCSYVuoOKMU4M7n94Il+byW4a vEmShJFkQ+BaxkyIoDTkjSQeaZ9IvtFLot30UCzGden9/j27tqfdDgmZP98uer7O/crW Kd2Qzes7pD/FCJfoBrZ6bsvUt7FhW9jvxeN2Z3CzKR3/hFzuuC4atUcLlqRKYl836074 jGAkn7DKh03M43q7Jb5ULPznxZkS2ojbHK8xfONBC9JMM9BMygKKOjc5BDtMz8c+8piR 6T1Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=LkOk3ZLC; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25c5158bsi289978666b.348.2024.09.08.17.56.09; Sun, 08 Sep 2024 17:56:09 -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=@gmail.com header.s=20230601 header.b=LkOk3ZLC; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 99BA168DAB2; Mon, 9 Sep 2024 03:55:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BA0A268DA73 for ; Mon, 9 Sep 2024 03:55:11 +0300 (EEST) Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-374b5f27cf2so2159572f8f.1 for ; Sun, 08 Sep 2024 17:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843311; x=1726448111; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=o5YbG30AsPN7oCSVvo9hkRXZvSwqET1I+AB6ltcLJjQ=; b=LkOk3ZLC2qEFr9CXGQEZKAwE0gQ07HQtW6b9/PMGdFwkoAnVZ/H2QJwXjyfUng107G Xg0Kd/viaHqaDlhFTH7yH0GoAi6Kq5UHxh+VMp4wfvv8kU4Hs6rfSzqyCECClfljKvCj qkY/ldHOW4XUp8IOTiHa3MFlxli+F/bRe1KAVx0wWn1L3OUMohyYs1fbiVl/5N2WKc3i l+sXJUd6zwzPBqkbCiq02MU3qTfrUtWVfbhsRzQsiOqKBl+PUFP9V/bTxs69VMQXb7UZ 1m+iAXLkxJEO4i98daAGPCIEA44h2+Xm8gvbHUB2mwRclFPaXWsIue4MokKiVpSbjWkG IgnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843311; x=1726448111; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=o5YbG30AsPN7oCSVvo9hkRXZvSwqET1I+AB6ltcLJjQ=; b=t7h7DW+sS7jhasvB90ocytyeqSFE4e46No4gMKUh70k7wtEJVrBHmnC8tAEVYjQbnv Ms61ySXAVYgcfKe1e7OuCqe1E9e9zmt33VazwiNhYAWM9B5wHCl+be83Q9HM/nSAqJpZ 4vvSMHQLwW3uJSwmTKHNZ6KTToq869hI+6M9Ft+7nuwtrWQQBuGehCRsN0fJvllh9ivT GjxAQD7GEVuTvIdF8A1hvD5fqwbbfTIvomv126icIHF+7ynte2/pGlI9xpEcov0L8i0H a0DxsPKiXhVzKVURM8JrkPXFKmpAxkbkhjYjQzSgkOLRbj16Wej36oA0Lht3rMYeNy9J qEDQ== X-Gm-Message-State: AOJu0YxS5QE+03MRcAFhhdAU13xIeeQUADYSLpL179tm895wZ1IDL4fV 4FZ8/3itfcX5r/0XAVmSzuN1du10II/mXpnnsVhU4oGm1Fxn85Iw7Ob7fQ== X-Received: by 2002:a5d:6892:0:b0:374:c79b:ca5f with SMTP id ffacd0b85a97d-37892703f43mr3482945f8f.46.1725843310995; Sun, 08 Sep 2024 17:55:10 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.10 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:10 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 20:13:45 +0200 Subject: [FFmpeg-devel] [PATCH 11/60] lavfi/vf_ssim: use av_err2str to simplify code 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: s5scJaS0nWRL No need to explicitly specify the buffer here as it is only ever passed to av_log, so av_err2str can be used. --- libavfilter/vf_ssim.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c index 97bffcf70c..54e28d43bd 100644 --- a/libavfilter/vf_ssim.c +++ b/libavfilter/vf_ssim.c @@ -414,10 +414,8 @@ static av_cold int init(AVFilterContext *ctx) s->stats_file = avpriv_fopen_utf8(s->stats_file_str, "w"); if (!s->stats_file) { int err = AVERROR(errno); - char buf[128]; - av_strerror(err, buf, sizeof(buf)); av_log(ctx, AV_LOG_ERROR, "Could not open stats file %s: %s\n", - s->stats_file_str, buf); + s->stats_file_str, av_err2str(err)); return err; } } From patchwork Sun Sep 8 18:51:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51411 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1363766vqu; Sun, 8 Sep 2024 18:19:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUyxZ3wy0bcz/QrzXlUqx1yoASlFN7krpCXrPwxcqtLUdbcUXgmRR0n0OjqFT3TBrx0dRNbesL8S8T6HpbjaMjk@gmail.com X-Google-Smtp-Source: AGHT+IGo9PXJOuEUGKa4TdBjb+e2kQRRQ+GJ4zJXtfKI0/TdzBQ/vtDz+JufCb6PKJbC42+HgCfB X-Received: by 2002:a05:651c:1987:b0:2f7:5c24:97a with SMTP id 38308e7fff4ca-2f75c241996mr15713371fa.11.1725844755178; Sun, 08 Sep 2024 18:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725844755; cv=none; d=google.com; s=arc-20240605; b=WEVoDuvvjlF2Mcsw7uStPQdl4J/UFi9gfRtrtFHI0hQEPtMflZepfh3GeHw0+oKOKR SxyGa/gJvC+uHP1ipYAe9eC46m8LatZKDM413RHyYgxIrrrfJ+iMbKiqJDHX4bsyYruq jnzRY29FJdoxpNIk/rqtBvb+Lb4EkjQH7EY/jhDpWQH66pwsjV7k/yEdsd7NZ93o8BUo fmzyAZqdtUbrpMN2XYx6X23JBRzEbhlTzjkG4fs6cQisSmDVdlRUBRkz8re1AoiFptTx 56ZOIUX9dCoeoBf6Y2hYe8wCfSt2QVS3emwHp8Pz/tQMoDkQCulF9WbWAiUDDcGhXiXG D5ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=dx8/uee2rHyK4KXwuPuSylZhSf4XnbyMT9AeJRQDmlE=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=jHC2LfrDFTh7ELlZY1BoZagrSXSI9dbfppmwr2H3dggJWGmPO0NzYaQwWf3e82hvpQ d7nLDezYU3AQZsOVzPbxyEhpqNHL6MgRAYwEgTTdhD98T6/2ZdVoC9tCXcexm1fEHZBV 1ykJxO+JQv9PpVpSMa8xQH5bl80KYkbq9eKcdJhAJAYbuZbbfZPgNxahPYujH6itcLfZ 94wFPkn2vozieXdR33Jm7FhgfBR1zdzagndvdadFRubDEExylUpFzj1moquQlDV/km6/ rrbAy2Ik5pYMDIZF4gHPoHBi08jEBegxoMP/wWBR1ddnbaRLcUFloIQOy8bPTD3j22OO 5ghA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=TvcUfIm2; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 38308e7fff4ca-2f75bfd2d90si11433651fa.55.2024.09.08.18.19.14; Sun, 08 Sep 2024 18:19:15 -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=@gmail.com header.s=20230601 header.b=TvcUfIm2; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1DD7D68DB02; Mon, 9 Sep 2024 03:55:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BCC0368DA9B for ; Mon, 9 Sep 2024 03:55:12 +0300 (EEST) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-374c5bab490so2944981f8f.1 for ; Sun, 08 Sep 2024 17:55:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843312; x=1726448112; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=sbWVPa6SxJPzujpfy4gHjNwfx4jl8SVJtB4vZS1+Zl8=; b=TvcUfIm26YZkQm/JUZ3uYkZLHhHnQy4GNnIDRecUX+BT9Xx9C6XLdW0q5VaD5kcVIZ SjIxG8tEzbHpb3uLyiUYZ4kJksFJjDhoPi8ltM3BIF+7J0XmQG/ERltCeizbmWcqlb+8 9pcX5gkvwvlOMrd5mKvaWzH02MFnEHtSKtXvDhIbtnVWCvD05dtFvAfnO719iWZNNPd7 Va0kXah8xyKRF20/1WS+YLUHUWdPjiXvqd+TxsC23jaUSkpZW2EVUE0qm+eYIoG8A+LF 2M34igMNdIuWEHzXDekuWpK3Nforb2G6OOHXGZyrRhXiHEEHUKxhg1FwF0KePxJUYAlM k97Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843312; x=1726448112; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=sbWVPa6SxJPzujpfy4gHjNwfx4jl8SVJtB4vZS1+Zl8=; b=IHin/2VRotcmU6t/2+Zvu63NmWgLX61jx/eTvz9Mb51wTL9rUyTuUTs1UNe1xP3ANL K4JxTOw4ZZyO//Ms0QNJWX6fDCXw7meXhCU4C1ERl3A0w7qLi6D9XasG89ZoH/TdhCTB ma61mMtDj4osnDz0R5SMihn3zbwRshvf1aLsBR1WE5AVQb1U3LvDUFS8mpPrTsSkFBwZ OFtjL0jmTCMlWhjbgkmMsAFQ89rb2U+zR08As7MeTzQPt8f6MACnQL/JeUktqfNZgVvg vnFrH2K5WBZ0a4/N3ZptYT3sKr7guyFlr+EtohlEEdk4Uopjz4K0NFXgPkGyUu5yOWH3 7JJQ== X-Gm-Message-State: AOJu0Yy/f/q1QMSkcLdCpRmsdVoLtDX2gRQZO4ywtAFBgenx5zrl2Iy+ /E1XAY/pko5lTnerTUMq7uYDJb1M4k5Hvtb8TDxHJfbAFPZoDy2JYZg9sg== X-Received: by 2002:adf:f547:0:b0:374:bfd8:eeee with SMTP id ffacd0b85a97d-378885cfcd4mr6383147f8f.10.1725843311947; Sun, 08 Sep 2024 17:55:11 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.11 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:11 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 20:51:47 +0200 Subject: [FFmpeg-devel] [PATCH 12/60] lavfi/vf_ssim: narrow variable scopes 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: rEKig+oi+fJf --- libavfilter/vf_ssim.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c index 54e28d43bd..52b22a6870 100644 --- a/libavfilter/vf_ssim.c +++ b/libavfilter/vf_ssim.c @@ -194,9 +194,8 @@ static float ssim_end1(int s1, int s2, int ss, int s12) static float ssim_endn_16bit(const int64_t (*sum0)[4], const int64_t (*sum1)[4], int width, int max) { float ssim = 0.0; - int i; - for (i = 0; i < width; i++) + for (int i = 0; i < width; i++) ssim += ssim_end1x(sum0[i][0] + sum0[i + 1][0] + sum1[i][0] + sum1[i + 1][0], sum0[i][1] + sum0[i + 1][1] + sum1[i][1] + sum1[i + 1][1], sum0[i][2] + sum0[i + 1][2] + sum1[i][2] + sum1[i + 1][2], @@ -208,9 +207,8 @@ static float ssim_endn_16bit(const int64_t (*sum0)[4], const int64_t (*sum1)[4], static double ssim_endn_8bit(const int (*sum0)[4], const int (*sum1)[4], int width) { double ssim = 0.0; - int i; - for (i = 0; i < width; i++) + for (int i = 0; i < width; i++) ssim += ssim_end1(sum0[i][0] + sum0[i + 1][0] + sum1[i][0] + sum1[i + 1][0], sum0[i][1] + sum0[i + 1][1] + sum1[i][1] + sum1[i + 1][1], sum0[i][2] + sum0[i + 1][2] + sum1[i][2] + sum1[i + 1][2], @@ -443,7 +441,7 @@ static int config_input_ref(AVFilterLink *inlink) const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); AVFilterContext *ctx = inlink->dst; SSIMContext *s = ctx->priv; - int sum = 0, i; + int sum = 0; s->nb_threads = ff_filter_get_nb_threads(ctx); s->nb_components = desc->nb_components; @@ -464,9 +462,9 @@ static int config_input_ref(AVFilterLink *inlink) s->planeheight[0] = s->planeheight[3] = inlink->h; s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w); s->planewidth[0] = s->planewidth[3] = inlink->w; - for (i = 0; i < s->nb_components; i++) + for (int i = 0; i < s->nb_components; i++) sum += s->planeheight[i] * s->planewidth[i]; - for (i = 0; i < s->nb_components; i++) + for (int i = 0; i < s->nb_components; i++) s->coefs[i] = (double) s->planeheight[i] * s->planewidth[i] / sum; s->temp = av_calloc(s->nb_threads, sizeof(*s->temp)); @@ -544,9 +542,8 @@ static av_cold void uninit(AVFilterContext *ctx) if (s->nb_frames > 0) { char buf[256]; - int i; buf[0] = 0; - for (i = 0; i < s->nb_components; i++) { + for (int i = 0; i < s->nb_components; i++) { int c = s->is_rgb ? s->rgba_map[i] : i; av_strlcatf(buf, sizeof(buf), " %c:%f (%f)", s->comps[i], s->ssim[c] / s->nb_frames, ssim_db(s->ssim[c], s->nb_frames)); From patchwork Sun Sep 8 18:53:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51437 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1401122vqu; Sun, 8 Sep 2024 20:44:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUpJC/cCeGSZKEMBWdTF/pKy+GEocbfiepDa3ijcEfDgAb2FQDC0oVhtgfocB5bXJcPPWwuCcMQqJMEulytzpmT@gmail.com X-Google-Smtp-Source: AGHT+IEl/WnNXMkCJjto5Df427e5vZuscfw5UWoS7RqVJ7ISh99paDE2sxPPIS7bFr1nYS+agYnU X-Received: by 2002:a17:907:3e12:b0:a8d:2623:cd49 with SMTP id a640c23a62f3a-a8d2623d223mr187625766b.11.1725853450767; Sun, 08 Sep 2024 20:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725853450; cv=none; d=google.com; s=arc-20240605; b=TYTGjzmFabYjq2hTcwDggH4bZZetmSlGeJ2uXOdAOgkYMbbJhmSb6l+37fYncW3pdv tYjIt7N7ThiN0imDDRu4AjzTXp3udYQUdCutixLUYOlhILuWwYYve7i0rFjc4rwAFlZS XS82W/+yYaJ5z+iiB2KoJBZQfMi6f1N2WE5vwTepmScfHhyA1UUntnF6gGefndB7Ph6n NaaWO9+kqIiRf1fZzhHAsZ7pOza2TUP84+ik4DnjrM1d/wuogMh3en9sWS4FpsnQZ9xK VPgeNked2t73iBOMf1xfndUUXrRTwbwgWQEhKgFd/pmjht/brkpRwRupxXJOBFk4lQnp 44dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=D5hrz1/6f5yn5PLV5KjNJAhUKVd3GPRpheM2B2XqOWI=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=MSK62aSwHx1SVFLax3yH0waxqu4vcRd54w22cKVt8oG0Q21W/hMzkixSDro50z2oZu Omrgp+Ua6xoWIBmhTbAE1lltplU9kG35kEChLgzOKIbjmR0AoNa262e0atMf8+iaRcc6 gehO1e/kXH1ZWAJtG8FXX9yOTkUuUdSl9HQelH/vkg4phohGfatgdCFuQfs8WgJfT5jh 85YkUvJOU4AN7NZOiN4jEDJCTmWekqDmdl2/pXSX6Sfxofu/lrvGSA4C3RtYvuFEMM5t lgjyQ39EZ0s+QXwJ+12Nuj/JuvS5nwx8U57F1vjSsSWSNXvInvqMfRrWuAfRqinG9tPv 9Bvw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=idhc2Uri; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25950a67si324286766b.219.2024.09.08.20.44.10; Sun, 08 Sep 2024 20:44: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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=idhc2Uri; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A982B68DBAE; Mon, 9 Sep 2024 03:55:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AB9EC68DA58 for ; Mon, 9 Sep 2024 03:55:13 +0300 (EEST) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-42c94eb9822so32064465e9.0 for ; Sun, 08 Sep 2024 17:55:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843313; x=1726448113; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=7uQWgCL2BvGZNqklZi7WXtHjNy5JFjrJkPn6Hqk3HIQ=; b=idhc2UrijBU9s9cV5bfsYOEtlVKARSs1AKqKD2FTu0P7cfeqoQOElVnoeLuTP0m7+y HJkTVBHhAxzQ6GlK1VxRbeWNmmBmd9DNeQoYza+nj8qelb352kDim2xZPpJLo9ILIP3W lzSK6giNRnmQ3JC41bZMJWUvTCiN/7Sf0snuLdK9EaTUVvAIVhh0J6mQsXQoN8nUl9gC 6c0Z2n0rL1HPYDdAJywKawirpoYgMB0CN9iC+K5tLGwNLDdpqIz/lwS0ZrmuuObhebDr 4GtMzJVV/f75viwiVu3CUAN8+iJhVMupUmS4/1lrYF/2q3T1sp1TPrO/6gAUjdF/ud+U L9cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843313; x=1726448113; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7uQWgCL2BvGZNqklZi7WXtHjNy5JFjrJkPn6Hqk3HIQ=; b=AgHgG3zQgZIUVDTIYUQdk7u7dDu7sCRum4u94VXm0zmRVAjoRejZYlEE2HSds1X929 gsiZH0DpbHu30N759K+toYEn1sjXaURPmPyFf+PPZ/EI+ESg4pBnxsJ0OcjNP8S3PMQL GAoKkhjavYv0PfbHN23qhcqS3p1hmRaFJUWXI6Vz6HyrKdML4LKQM/BrGoHwdbRLD1jP WmNiCxOKZ2EmbkuGrhRNQZaIU1fq6JX7Oh0LBb4XPfs+gv7l9OeYQ3FRESZf17TXJyHv RrhRWsmm1gByDD3v71Ddlg/FltnINgpq9RaMzmg+XwQWlI9GzOEgMAi45Ck3W93hMFpn AUsQ== X-Gm-Message-State: AOJu0YwCE14ssytnHi6iK0gkgj6zyYbPbKz6etKOEc6W9OSAzRlP9tBu dCVVGPZGhSxTppEQvofIyIgpLndoU7losB62+MYVCdOPgRxzGH3nwVEfzg== X-Received: by 2002:a05:6000:4581:b0:371:9377:975f with SMTP id ffacd0b85a97d-378895d4740mr5653510f8f.25.1725843312925; Sun, 08 Sep 2024 17:55:12 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:12 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 20:53:11 +0200 Subject: [FFmpeg-devel] [PATCH 13/60] lavfi/f_metadata: use av_err2str to simplify code 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 9X0z537F8bUX No need to explicitly specify the buffer here as it is only ever passed to av_log, so av_err2str can be used. --- libavfilter/f_metadata.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index 1a72284790..abdfb1802b 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -276,10 +276,8 @@ static av_cold int init(AVFilterContext *ctx) } if (ret < 0) { - char buf[128]; - av_strerror(ret, buf, sizeof(buf)); av_log(ctx, AV_LOG_ERROR, "Could not open %s: %s\n", - s->file_str, buf); + s->file_str, av_err2str(ret)); return ret; } From patchwork Sun Sep 8 18:56:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51442 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1417286vqu; Sun, 8 Sep 2024 21:54:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXR3336AKkw9Hbs/BPLyJ2Axnl4t9NT1VQ2TT3BDGLsikM5ABTfh7rZOJgk5bqdId+tzMBBOEhmvy4JPur0Wuaa@gmail.com X-Google-Smtp-Source: AGHT+IF0ZNC+tsVJNMUgezeoBIMbla32EwgD+yni8Lp67lhz8rETNdIyq3WDm4rAG6xNszBzc2uq X-Received: by 2002:a05:6402:5246:b0:5c2:5254:e340 with SMTP id 4fb4d7f45d1cf-5c3e953542cmr4135558a12.4.1725857651178; Sun, 08 Sep 2024 21:54:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725857651; cv=none; d=google.com; s=arc-20240605; b=ZXyVPgHCyFbxt5x5ye06HCZKQUmWG26KageOJqel9LRYrnWFYCnv+ae8F08Cman8CV BqIqF7977sHF3fnvOp4pQTZopQeZ+xAB3YXbDLUY7Vls30GDYxeZLn1vPNGeYDg7PU8r rX6vHLPfKcxv/DlKzhvr3Kh5cAEwXkHlxTD9uCVPxYDA38Xc1Yw/ZH9GWRJqq+RR19uT SzwwEOTCRcX3hGW+wvo8+hWAJucsbgY8+4vEJe4d7H46339jplHZ1IwjxS9CUoX/omCl 2mPwZ3vWfodkrC/uvmYSBGbHfpGl7lu7cw23mmK7MNnMmXe/t3qtNoBiHE/WY5C2B4mt ksVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=BApQS78FnJ3uD6xEGram2Wt8Cmpye8OROlvHDY3ouio=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=hTxi2jo4aVoCfWTQ4RfG5l2UBWX9BMbH2FXDW++wFdzwlS9JvXRnSRCywhBR0Jb0Sg L97wsJj6JxkfNCnGsMFnbJoZpxDGEKONeY0rjCPFiOIz1VNqw/oYqM5wPifQ1D9bUcJV KxiIwP7R2Df3YojCrMC2cCdIomtAlDkiv6ldTs4qmDrSRIh7cfMMgEizHI038dbbYIqr 7YoLJgAdLQMGfOf/k3TYhf0071ArH5qMj+GLup8IZNvEGWj3FsGbkkz44ZBMGE9e6mFl 85lslYcRexMrZ/NmG2ZAxDzK7DKAq6pWoJuaLDLbARWUued0tCxsD+qR9epvau6ajqQn IXjg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=Hh4cepzA; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5c3ebd98cccsi3254767a12.372.2024.09.08.21.54.10; Sun, 08 Sep 2024 21:54:11 -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=@gmail.com header.s=20230601 header.b=Hh4cepzA; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E4B1568DC12; Mon, 9 Sep 2024 03:55:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CC70E68DB0E for ; Mon, 9 Sep 2024 03:55:14 +0300 (EEST) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-42c94eb9822so32064555e9.0 for ; Sun, 08 Sep 2024 17:55:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843314; x=1726448114; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=lSDSCNXdytByiQzO+d4KbiLOmw6zizdtCswmlN3lu78=; b=Hh4cepzAVjc4jhD9qPvcRUMRKTQgli8/zH3520CFdabjGswkeusLN1uRs4LF6AW+9G G60y7NZqdNUk5MY124jYfm9xpQcNGaXbMDpBMSyOmkkq39nZxvJWeW0xZsK6/8J20CVr KZamWAYL1DOI0ozrgtMAjCSwHgIZQct7uhBwh61u13Y7MjnAwNuy2rp/cVOSHDv2AFNc ttx4496TGxFZUyX6EGEz/S4o0QQgnm8tC6wbLK+tB4Nu01M6OXHqsYMjKj8vKxTWSoV+ Lknu0C8QhR6vc35KmGXp1MTnpape+r8b3UO0Ri7r1bvtfCDwc6uFDdmNtwBGpt0fb98f kIew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843314; x=1726448114; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=lSDSCNXdytByiQzO+d4KbiLOmw6zizdtCswmlN3lu78=; b=IWrj0//n+RERzrSwnP2iMFIE16BUlqo2dNglparKzA4vFTENlOf8ZAJctRC2VRE5yn agTMPGxnPvy77oLuBZRlgVVgnSOTwdZaxBWC9nJkRoUmVHAFIeUGs+cmXc6BMoXzw9J6 KOh6PSMEBElKerBAQiynb8YaISk03qcQ8v5fpMzi0iz5uUf0xjiasueBDXkCJV7GULkh z7TDp9OOn7lnzOn+90befsHT5fd9lxuEvopCOMElv/T4h2ywcqVV/XnM9+zjjUqKuwlq jHg/pooVtK8cFb3eGdIorFqvTPTO8WN/RUwdExl3ptKmlNYyZlhWQ0mc60jgXqW4in8F EmyQ== X-Gm-Message-State: AOJu0Yx1XipvVvQNnXhyXz6swJAZE73t+ZtB5oWiROuwsCa/smVmW09k VXAhN3EBMMVATcKTJZmq9vuUyJfBw2M19kDlRJb6IZd3PoQkB9N9/YZSJA== X-Received: by 2002:a05:6000:1281:b0:371:8c9c:d97f with SMTP id ffacd0b85a97d-378895b7999mr5885343f8f.10.1725843313991; Sun, 08 Sep 2024 17:55:13 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:13 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 20:56:38 +0200 Subject: [FFmpeg-devel] [PATCH 14/60] lavfi/vf_signature: use av_err2str to simplify code 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 1tVLxs4GuGfl No need to explicitly specify the buffer here as it is only ever passed to av_log, so av_err2str can be used. --- libavfilter/vf_signature.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_signature.c b/libavfilter/vf_signature.c index f205f6919f..f419522ac6 100644 --- a/libavfilter/vf_signature.c +++ b/libavfilter/vf_signature.c @@ -386,9 +386,7 @@ static int xml_export(AVFilterContext *ctx, StreamContext *sc, const char* filen f = avpriv_fopen_utf8(filename, "w"); if (!f) { int err = AVERROR(EINVAL); - char buf[128]; - av_strerror(err, buf, sizeof(buf)); - av_log(ctx, AV_LOG_ERROR, "cannot open xml file %s: %s\n", filename, buf); + av_log(ctx, AV_LOG_ERROR, "cannot open xml file %s: %s\n", filename, av_err2str(err)); return err; } @@ -500,9 +498,7 @@ static int binary_export(AVFilterContext *ctx, StreamContext *sc, const char* fi f = avpriv_fopen_utf8(filename, "wb"); if (!f) { int err = AVERROR(EINVAL); - char buf[128]; - av_strerror(err, buf, sizeof(buf)); - av_log(ctx, AV_LOG_ERROR, "cannot open file %s: %s\n", filename, buf); + av_log(ctx, AV_LOG_ERROR, "cannot open file %s: %s\n", filename, av_err2str(err)); av_freep(&buffer); return err; } From patchwork Sun Sep 8 19:16:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51408 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1362304vqu; Sun, 8 Sep 2024 18:14:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWiUwyXN6ZBxW9smkrDnPYGTbN8zGrBg0zGCSMf0gbcEggsPgc48RKbyB88XpdI53UOxTpTU9vi5ii578cA3R/4@gmail.com X-Google-Smtp-Source: AGHT+IEEav1iMAovIxyY8jNc8Z7+ua5Z5VvPndZcxIYKLf//JrP6kpCeDR1j+ZNLRvd8nOUakL2t X-Received: by 2002:a2e:4c19:0:b0:2ef:2c0f:283e with SMTP id 38308e7fff4ca-2f751ec89bamr51760201fa.12.1725844449125; Sun, 08 Sep 2024 18:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725844449; cv=none; d=google.com; s=arc-20240605; b=XDnETpbIfW/uo+Em2HMYy7oLdhsmgLsLuyCJVqqKegaN03NS+VFOJwU19/ZP2VvzOF CdllB5C4qZthnulcTPlnAdTLUiAwu4ZPuWBU+wFPhkYNE9449OdnTbuby6GIaBP9QTi8 E6Ck5df1cWd2NCy4HnawLuwXLhPLjyFUdBBdtYashdGhlJspBJvZ//Z4VqJHdaUg7Hf2 0oQasyh1owUqwGsOvvrwLxwSrwg2t7RfrcZ9j1v0n6eW4LV4ORxW9OSYlF1xn1NYXYPC sPkMHpw933/Do+MT9+VDIi3nmIVteHGp6qZNkMlC5XQdwa8wphSLIY/RyZJJqWgmYRD8 gZzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=pISPrJs7cB/PQ0dWBiilXaAcKrGcM6JSaQJ3lZyIbQ0=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=YVfSdg4BZdJhWP3oD95UGXpzkcc88Hclrxi1WQAyNq6CJ00fg1crds/gnCUKy0nV/F vWQvk2JQIIxkAV5zhq9UpnBEeErGfsU6Yz9VIB088rTKcpbZtFA42xhu30c+b3d5zNgF 41xrQuz9yiMa3tvlHur0lZOofuQrRCiNLSXOViLb8KqZnvI6BGcGI6c5BGwE8UYvg0A3 w7zgCGBfS66wy/EyoHjn8NJkzWg6adWEIV/P69daaLhRnRxuaSEPlYorrw6w7A0HX2Kp 7Y3ecRs0oMoyp5dwKjr+UaEqCpIps1ZgWzKJj/Aa04ahidDYrWNIaOUZgOiY2hS4Uml4 PIRQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=PHmHHZzL; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 38308e7fff4ca-2f75c0b8830si12095441fa.636.2024.09.08.18.14.08; Sun, 08 Sep 2024 18:14:09 -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=@gmail.com header.s=20230601 header.b=PHmHHZzL; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 21EB468DC2F; Mon, 9 Sep 2024 03:55:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C3BA468DB20 for ; Mon, 9 Sep 2024 03:55:15 +0300 (EEST) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-374c1e5fe79so2432524f8f.1 for ; Sun, 08 Sep 2024 17:55:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843315; x=1726448115; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=WZbUHmJDJ671a3SUsrPWRLS6CXcdzHqzgI1B0Iqpp2s=; b=PHmHHZzLvBIO8PZVTK4LTlUIkAh6vOgqjGDvZe9/J8HzywXcAZX3Ej5n9a4NkjeSNR ugPWkssb/No6JBQ1eUv0I0KtR78feD4eYXICjPQ7IzRxdfhcIkrP8iW1qy/+jwxz440s /ZxVHhOBaDxTpJnAMNeJ3gG2DEi6C2aOArVnXAn+QO34zxaomU5QcKW6leyPV5+LWuXT fImA5nv7ImIYXV61kROoQMg2CY38ReZ32NaIQnYE+ezA8ifjrckl0GDZRv7uCY0XUEJ9 Jg5PbHV0Q5k628PMbeBmO3ONCdMD90/HxjLqtPa1Lr9i/3gUHtqIhpVnjwk0kM1c909w X2dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843315; x=1726448115; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=WZbUHmJDJ671a3SUsrPWRLS6CXcdzHqzgI1B0Iqpp2s=; b=S/6rRDdnIFWHEJ7W+1U9QVLQZ7awHbcYfjj9UKrzVKTG8OZPS1NZHNObRey2ksM3Ra s6EjuLusCBtqMznbVHvwi3Y0Kum3bKvMskuDPc843xAijkQp1GR3SMVSigIEp5fKOxct VILpWBBLf9bTS3rkvvuLXfDR+ib6vYjnjk2H168USmyLQCEjnMBGrvLd6a/J/2ur/RTY p3RN9qD1fimBeIk1vaZuEaIvLL/OHBVYCwDAXNogxALxiWFK6TpIDOlpn4tg+mXXzveZ +ZQzzPzNu3boj0mhgLeSGftC8SwNvNiZN22xUNDmQYHxogWcFFScb2t64C4CQb2YMff3 vNHw== X-Gm-Message-State: AOJu0YzJaEjhTXVnpPZ7waficd2qnZnOtk/P/JFubN/kQS/QoC44ab9s AJhByp9hXtQx1nEAKXIxAgYdMfV9Y10yguYRim/jeQe1wAc8iaQ9hlPyfQ== X-Received: by 2002:a05:6000:781:b0:374:d25f:101 with SMTP id ffacd0b85a97d-378895c9c4bmr7735124f8f.18.1725843315050; Sun, 08 Sep 2024 17:55:15 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:14 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 21:16:45 +0200 Subject: [FFmpeg-devel] [PATCH 15/60] avformat/network: use av_err2str to simplify code 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: vRlS4RjyYKT1 No need to explicitly specify the buffer here as it is only ever passed to av_log, so av_err2str can be used. --- libavformat/network.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/libavformat/network.c b/libavformat/network.c index 6db82b6d26..2eabd0c167 100644 --- a/libavformat/network.c +++ b/libavformat/network.c @@ -287,16 +287,14 @@ int ff_listen_connect(int fd, const struct sockaddr *addr, if (getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen)) ret = AVUNERROR(ff_neterrno()); if (ret != 0) { - char errbuf[100]; ret = AVERROR(ret); - av_strerror(ret, errbuf, sizeof(errbuf)); if (will_try_next) av_log(h, AV_LOG_WARNING, "Connection to %s failed (%s), trying next address\n", - h->filename, errbuf); + h->filename, av_err2str(ret)); else av_log(h, AV_LOG_ERROR, "Connection to %s failed: %s\n", - h->filename, errbuf); + h->filename, av_err2str(ret)); } default: return ret; @@ -421,7 +419,7 @@ int ff_connect_parallel(struct addrinfo *addrs, int timeout_ms_per_address, int64_t next_attempt_us = av_gettime_relative(), next_deadline_us; int last_err = AVERROR(EIO); socklen_t optlen; - char errbuf[100], hostbuf[100], portbuf[20]; + char hostbuf[100], portbuf[20]; if (parallel > FF_ARRAY_ELEMS(attempts)) parallel = FF_ARRAY_ELEMS(attempts); @@ -445,9 +443,8 @@ int ff_connect_parallel(struct addrinfo *addrs, int timeout_ms_per_address, timeout_ms_per_address, h, customize_fd, customize_ctx); if (last_err < 0) { - av_strerror(last_err, errbuf, sizeof(errbuf)); av_log(h, AV_LOG_VERBOSE, "Connected attempt failed: %s\n", - errbuf); + av_err2str(last_err)); continue; } if (last_err > 0) { @@ -511,9 +508,8 @@ int ff_connect_parallel(struct addrinfo *addrs, int timeout_ms_per_address, getnameinfo(attempts[i].addr->ai_addr, attempts[i].addr->ai_addrlen, hostbuf, sizeof(hostbuf), portbuf, sizeof(portbuf), NI_NUMERICHOST | NI_NUMERICSERV); - av_strerror(last_err, errbuf, sizeof(errbuf)); av_log(h, AV_LOG_VERBOSE, "Connection attempt to %s port %s " - "failed: %s\n", hostbuf, portbuf, errbuf); + "failed: %s\n", hostbuf, portbuf, av_err2str(last_err)); closesocket(attempts[i].fd); memmove(&attempts[i], &attempts[i + 1], (nb_attempts - i - 1) * sizeof(*attempts)); @@ -528,9 +524,8 @@ int ff_connect_parallel(struct addrinfo *addrs, int timeout_ms_per_address, if (last_err >= 0) last_err = AVERROR(ECONNREFUSED); if (last_err != AVERROR_EXIT) { - av_strerror(last_err, errbuf, sizeof(errbuf)); av_log(h, AV_LOG_ERROR, "Connection to %s failed: %s\n", - h->filename, errbuf); + h->filename, av_err2str(last_err)); } return last_err; } @@ -591,7 +586,5 @@ int ff_http_match_no_proxy(const char *no_proxy, const char *hostname) void ff_log_net_error(void *ctx, int level, const char* prefix) { - char errbuf[100]; - av_strerror(ff_neterrno(), errbuf, sizeof(errbuf)); - av_log(ctx, level, "%s: %s\n", prefix, errbuf); + av_log(ctx, level, "%s: %s\n", prefix, av_err2str(ff_neterrno())); } From patchwork Sun Sep 8 19:30:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51440 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1412906vqu; Sun, 8 Sep 2024 21:34:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWXq2rQ5jCoxZrcy9L7X497w5uyLNtvu+969MTnCgJOj95N9rmJvaXNyRoJr9JLGkxNcltWxveUVNio0MLL+IfG@gmail.com X-Google-Smtp-Source: AGHT+IF52Qt23XGeP5ZSlAiGKjV4n6cM8XlydF5yWBdPyqCb6ARhszzTT16H6wnvSKV99rR4bgzT X-Received: by 2002:a2e:bd11:0:b0:2f7:66ce:a319 with SMTP id 38308e7fff4ca-2f766cea5b1mr6882981fa.9.1725856451203; Sun, 08 Sep 2024 21:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725856451; cv=none; d=google.com; s=arc-20240605; b=CIgUi7+zgJAzdoWcs1BWcSqvZiBm9mW2kig722f3CuGT2eacqmIUAyZ8ECWAP0jvIL IUJIrJXrvvrCAGOvcOp2UUa3PCdnHIQaij90q5vNfPwMQFEqUu0YRa4PCdW0P8MfUy9S /BcvSU9ZX6jiNWUATGikwq0AKNdRvvzypOwo75G/kVgUl5s34NQHvtXZlpCjcSbHAqVd tm1z79V0dsnGXm3pM7wWzgdGVCB1D1HpMJN1UQJm8IXHjaFkom7vQntuV2jiwXFaL+55 kf0ws/NB4yt8HDTxEXNbtNtIhPFsBYhXVGcvehhDFzXdBZTjxaj5GT/QO+h6W/h+MZL9 Zg7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=GMQfjWfP53/eTbz89H6WJcDvIth6ZKbKnOnBz47H3I8=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=WPJ72JgXfdgLqmtIN8UbvFJgQDjy4x7VsSN6OaCsXSY0eFLmdDaLUStBjjObWaw5/O llOjWoE1SXpj16QPqPzBEH3ESuzhFRouQu3BGxtx9mQypvUujlCoKz6U2MAHo2PNwRYz Q6gme5B7vZ2rPXj8ABWg7dAlWjZ+VhYSOso7IidZTuVmQAA+9dRnkaR1icWHb8fhR+st PNzOfM9bIrCrWIBiwWihwMBZcUBGL/Gxsw8liaNKHBIDbYpDkJbzE8Sfh1tGCiNNwn4r MyC676L4MwlLiFdrKBd3akvRESCMKD3D67kK0zS/mkv6gq+IZUmr0MsKtYwsJB20vgCD UAPg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=dWsBaGNP; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5c3ebd7a0afsi3158766a12.290.2024.09.08.21.34.10; Sun, 08 Sep 2024 21:34:11 -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=@gmail.com header.s=20230601 header.b=dWsBaGNP; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5FE5368DC47; Mon, 9 Sep 2024 03:55:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D1D2668DB2F for ; Mon, 9 Sep 2024 03:55:16 +0300 (EEST) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-42bb6d3e260so33712955e9.1 for ; Sun, 08 Sep 2024 17:55:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843316; x=1726448116; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=r1Bhs21Y7waGB+5jXXPYfkwwJH6zX4y1G9sjwhQmOp8=; b=dWsBaGNPPRjrs9LPxjwQndYTT35/KXND1XcmV86BZiGb+9fUkbAyVwREoXS6be7+aO +TWrgAaRzoAxdDW8Y0bc7Cjgdrbexl27ZgMUx4ZCYYkKnuod3ksBr/kep6Q8BDUtdiyF 0mK9ffUkxhd7P80pgjFboUNjPsKbStnEOdiQRtGN4kBy5eTH7JmzGVFM2MEDLMdHKa8v QQGPm/pglWd9M+3V6S/GYIyELLJ3oORi2rM3ksofGEgGnB1GLuASoBYkU/Zx/ps93ixI ouRwYER8IEHt6iyM3qk051jouQNz55CSSI/04Xrrk6DVk16wtdmtGLbVPcR0sKUUhIJD x/pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843316; x=1726448116; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=r1Bhs21Y7waGB+5jXXPYfkwwJH6zX4y1G9sjwhQmOp8=; b=rah094nvcdFR/Haj0808ScLZ3v6sTEiA1Rt/+9qiawYjG87sTOm54iP2+7N3gUmhHa uAUTMfMi3aCB3yllf5cigduYVXQIJ3JzF/D/rrC2Fu6dWvBz6X5BWtnSmmZSsbvIfLem ts8BXkuMMUrylFdHC0KK3kKqdVzLF9/RA7keZxE71osFTq30TiXBIq+hRPFYmGSMQDBE Gd+bFBSMJbWODfcaVaZKI5tYA5Zl4mNBB6dpblXtBuUhsV6ZRNj2r/Ss/KGNDvm0JkQb QMu7amp1TDOvlZcln2+oCZytks5CDNFqkqqu5UIPmQH/k39b4oLN/5f7UyCCY8rJ4GtX yYGA== X-Gm-Message-State: AOJu0YxIncLaXMwRoWTNOGatt5O7igqPBsEZtMc7AwuCHU3Z2ITVbCNp rdewjipwTXfFSsElF8ju5al27D8rWQqLhpF8xDC3zXSHVE7E4UcM6QEIow== X-Received: by 2002:a05:600c:b9b:b0:42c:b037:5fce with SMTP id 5b1f17b1804b1-42cb0376448mr34591205e9.3.1725843316015; Sun, 08 Sep 2024 17:55:16 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:15 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 21:30:40 +0200 Subject: [FFmpeg-devel] [PATCH 16/60] avformat/dashdec: use av_err2str to simplify code 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: NrozIMIt0O/h No need to explicitly specify the buffer here as it is only ever passed to av_log, so av_err2str can be used. --- libavformat/dashenc.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index d4a6fe0304..df9d0c9d50 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -277,10 +277,8 @@ static const char *get_extension_str(SegmentType type, int single_file) static int handle_io_open_error(AVFormatContext *s, int err, char *url) { DASHContext *c = s->priv_data; - char errbuf[AV_ERROR_MAX_STRING_SIZE]; - av_strerror(err, errbuf, sizeof(errbuf)); av_log(s, c->ignore_io_errors ? AV_LOG_WARNING : AV_LOG_ERROR, - "Unable to open %s for writing: %s\n", url, errbuf); + "Unable to open %s for writing: %s\n", url, av_err2str(err)); return c->ignore_io_errors ? 0 : err; } @@ -1054,7 +1052,7 @@ static int parse_adaptation_sets(AVFormatContext *s) } else if ((state != new_set) && av_strstart(p, "streams=", &p)) { //descriptor and durations are optional state = parsing_streams; } else if (state == parsing_streams) { - AdaptationSet *as = &c->as[c->nb_as - 1]; + AdaptationSet *tmp_as = &c->as[c->nb_as - 1]; char idx_str[8], *end_str; n = strcspn(p, " ,"); @@ -1062,7 +1060,7 @@ static int parse_adaptation_sets(AVFormatContext *s) p += n; // if value is "a" or "v", map all streams of that type - if (as->media_type == AVMEDIA_TYPE_UNKNOWN && (idx_str[0] == 'v' || idx_str[0] == 'a')) { + if (tmp_as->media_type == AVMEDIA_TYPE_UNKNOWN && (idx_str[0] == 'v' || idx_str[0] == 'a')) { enum AVMediaType type = (idx_str[0] == 'v') ? AVMEDIA_TYPE_VIDEO : AVMEDIA_TYPE_AUDIO; av_log(s, AV_LOG_DEBUG, "Map all streams of type %s\n", idx_str); @@ -1070,7 +1068,7 @@ static int parse_adaptation_sets(AVFormatContext *s) if (s->streams[i]->codecpar->codec_type != type) continue; - as->media_type = s->streams[i]->codecpar->codec_type; + tmp_as->media_type = s->streams[i]->codecpar->codec_type; if ((ret = adaptation_set_add_stream(s, c->nb_as, i)) < 0) return ret; @@ -1083,8 +1081,8 @@ static int parse_adaptation_sets(AVFormatContext *s) } av_log(s, AV_LOG_DEBUG, "Map stream %d\n", i); - if (as->media_type == AVMEDIA_TYPE_UNKNOWN) { - as->media_type = s->streams[i]->codecpar->codec_type; + if (tmp_as->media_type == AVMEDIA_TYPE_UNKNOWN) { + tmp_as->media_type = s->streams[i]->codecpar->codec_type; } if ((ret = adaptation_set_add_stream(s, c->nb_as, i)) < 0) @@ -1865,9 +1863,8 @@ static void dashenc_delete_file(AVFormatContext *s, char *filename) { } else { int res = ffurl_delete(filename); if (res < 0) { - char errbuf[AV_ERROR_MAX_STRING_SIZE]; - av_strerror(res, errbuf, sizeof(errbuf)); - av_log(s, (res == AVERROR(ENOENT) ? AV_LOG_WARNING : AV_LOG_ERROR), "failed to delete %s: %s\n", filename, errbuf); + av_log(s, (res == AVERROR(ENOENT) ? AV_LOG_WARNING : AV_LOG_ERROR), "failed to delete %s: %s\n", + filename, av_err2str(res)); } } } @@ -2120,7 +2117,7 @@ static int dash_write_packet(AVFormatContext *s, AVPacket *pkt) if (!os->availability_time_offset && ((os->frag_type == FRAG_TYPE_DURATION && os->seg_duration != os->frag_duration) || (os->frag_type == FRAG_TYPE_EVERY_FRAME && pkt->duration))) { - AdaptationSet *as = &c->as[os->as_idx - 1]; + AdaptationSet *tmp_as = &c->as[os->as_idx - 1]; int64_t frame_duration = 0; switch (os->frag_type) { @@ -2134,7 +2131,7 @@ static int dash_write_packet(AVFormatContext *s, AVPacket *pkt) os->availability_time_offset = ((double) os->seg_duration - frame_duration) / AV_TIME_BASE; - as->max_frag_duration = FFMAX(frame_duration, as->max_frag_duration); + tmp_as->max_frag_duration = FFMAX(frame_duration, tmp_as->max_frag_duration); } if (c->use_template && !c->use_timeline) { From patchwork Sun Sep 8 19:38:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51454 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1435772vqu; Sun, 8 Sep 2024 23:04:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWZnIYWkgFN1X87fQguwClExyqFvsKhcLqIbaSZsG12Zf1EynSSKYveJxyWkPNV3Dbg1OwHguCwKxBfzvgytixG@gmail.com X-Google-Smtp-Source: AGHT+IFBN8pauk8yR/yh7pJBPQUmdVY5R7HENhx/yMIhY2eiVx3JJaQqreFPLGZhqQWIJSncJZEN X-Received: by 2002:a05:6512:e97:b0:52e:7ef1:7c6e with SMTP id 2adb3069b0e04-536587fd1a8mr7087393e87.51.1725861851712; Sun, 08 Sep 2024 23:04:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725861851; cv=none; d=google.com; s=arc-20240605; b=bkeSyfXCntvfxUdmVtFO2OZhPHNaVk3BQvosFFtpLsSdGLAPgL45GwI5dQ3F+TW9HD 39NWCtLWNG0rx4+3weXELnnchwj0788OGSCR5mgTce94sZ8dizQ42quoIEMWWNrjy+Gn Vao+GM6Sl31nw+S/ZJBGTjTEuTGCzgNulWcMup9pUIdV/KPe6L8ni38vevQMkIE3vRg5 lLPGUZy35XLZdCZJfoyXLnzOcLRpQWRmRZB0JrWghul0zEd7im1hlokNc//obkJ9fdiz phSblxjNDJPwkzFR8p34fEXLJBV1FIMyIjecgbCo09qVqOW3rPznIeb57qpBHtbgX6j5 LmxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=FSu5DvZkKeSQpqc8+eG13xGNu59Oyi3NaZXZAeo/wR4=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=TQsmsm8/pZDRgxqy9DOPCd7ifowHUg4uQ/IlToBC7pqi2FYzXQrRxeiYxRrqBEnaRk CxT903Gp0SRrqb7heI3FdnuYdxo4gC/V2UdM65p3zPT1pUdz6KzITTxOTfMzJKEF11GJ 6Gq0E4S8aAudvxuM8rnHK4EKBWZJjb3QLFEBfpVXnZG0TIjILWQE6x2CJ+xLNuvYWpyZ tnrDjlwaYJrdIny5/n4q5J4fYsGfGVlxL5EmG6JfhK53XzXwUaEtvoX2CdOcLvpuu4bW 9fhJKMbNHdgynDviMoNim437Y/1+wTnCbJjMOUn96MKArxUhzNZ7LKhcxdyNt1I6yuF6 kb8w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=XE+q1HnC; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25cfc2acsi339965966b.675.2024.09.08.23.04.11; Sun, 08 Sep 2024 23:04:11 -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=@gmail.com header.s=20230601 header.b=XE+q1HnC; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CFCB668DC45; Mon, 9 Sep 2024 03:55:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AC82A68DB63 for ; Mon, 9 Sep 2024 03:55:17 +0300 (EEST) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-42cacabd2e0so16750585e9.3 for ; Sun, 08 Sep 2024 17:55:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843317; x=1726448117; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=hX2KpksDKq5N13NVqU0jzyyI8iLzZItucntQRZwjbsY=; b=XE+q1HnClOw9lTJnS0gL1O3KMiCatDskqcg60uKvB4Rho/68XKlg5tMJMHNmyyQPFX SN9MetwtFB7LXlb0Cvh+ldzMIHrptJzbx02oGQoI9rfiWMKtX9H1LnEfBatsxAt3OA33 inri+wAwQHhCNN1RrpEUOe7DdBIUrgaODCHO42dnnMKMBT2AhCJQCcuwcfcjxlZtBgh4 FRrpcsxOc9LUfJMeWZXKAcujI36MqsYR53TwybNARg9VsTqzydeZmD+PPRrEpczf6DOg mdVGsA6nb5RyVK+CUng7DnKaeUIwqwLfPsjFT7T0A2r9FAoTEmd4+aG6az/ebo+QrLCi 5Opw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843317; x=1726448117; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=hX2KpksDKq5N13NVqU0jzyyI8iLzZItucntQRZwjbsY=; b=v5Xa6mYpMay6zQWU1hvRhcIJJ6A7gqG4ssNvfrxqpEZmkWX1oeg6tIeWZd33GMqwNx 1CX9QMl9NS/iZurt1i/vewtfhSEE0CMX3O2P003QoIKlv3AHOHM6aPOEGp4qDlalNdOq a1xoHrvWi/XT7n2X27pZJ4psjYyFuKZZOVpd5gAKh9kA5Qs3jA3AtJr2kXWY4rwzVm8L fkquwi/yWwMVfP6i1reoZLL9oGrEcavESeZS2PP5qYGjUpDOnFGgYBHtJDFQHbul9OYq XrR1VjWgxhka6ZXb+QVJoIVvRmVFa8saYLGd/Ckqu4AD9octSWBLSRWRxSIu/lp3VfMz F4fg== X-Gm-Message-State: AOJu0YwnFIiMVdmjUFcwzf30ATDGa49W7SQWoFMTnX/8AMTuHKTzDNsm JQF/uLK3XlDMUVfHGF2vmuxzuyjUj4N1nDyhFm9JNOeeah1ErXI4oUfR/A== X-Received: by 2002:a05:600c:4fd6:b0:426:58ca:5a3 with SMTP id 5b1f17b1804b1-42c9f9e13f5mr67414025e9.30.1725843317052; Sun, 08 Sep 2024 17:55:17 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:16 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 21:38:12 +0200 Subject: [FFmpeg-devel] [PATCH 17/60] avformat/crypto: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: PVXp2QgWj5xu --- libavformat/crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/crypto.c b/libavformat/crypto.c index cd462e7b9d..868f6ddc25 100644 --- a/libavformat/crypto.c +++ b/libavformat/crypto.c @@ -62,7 +62,7 @@ typedef struct CryptoContext { #define OFFSET(x) offsetof(CryptoContext, x) #define D AV_OPT_FLAG_DECODING_PARAM #define E AV_OPT_FLAG_ENCODING_PARAM -static const AVOption options[] = { +static const AVOption crypto_options[] = { {"key", "AES encryption/decryption key", OFFSET(key), AV_OPT_TYPE_BINARY, .flags = D|E }, {"iv", "AES encryption/decryption initialization vector", OFFSET(iv), AV_OPT_TYPE_BINARY, .flags = D|E }, {"decryption_key", "AES decryption key", OFFSET(decrypt_key), AV_OPT_TYPE_BINARY, .flags = D }, @@ -75,7 +75,7 @@ static const AVOption options[] = { static const AVClass crypto_class = { .class_name = "crypto", .item_name = av_default_item_name, - .option = options, + .option = crypto_options, .version = LIBAVUTIL_VERSION_INT, }; From patchwork Sun Sep 8 19:43:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51417 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1369570vqu; Sun, 8 Sep 2024 18:39:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWEf0ad+b4bogEl6rgKLVQq/y8Sj+RwoKOwZEdshfsMPYF3AyToSM4eN5itd0dCjYpicNACBbpv/MDRorcf0yN0@gmail.com X-Google-Smtp-Source: AGHT+IEAs5mYLvZUhhhiXdCWWfZMa4LKNwknU/onlatyV/2JoEcuBH2yteWGzihyKnEDOoLbSCMN X-Received: by 2002:a05:6512:2391:b0:52e:fb8b:32d0 with SMTP id 2adb3069b0e04-536587e0078mr3207560e87.1.1725845953379; Sun, 08 Sep 2024 18:39:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725845953; cv=none; d=google.com; s=arc-20240605; b=KCOMCyPgnGZ2tFgM1vjQxCJLec3dIQumOrpvp35P680CRiikMeLt/WYf2IKoBn+X9D CA2YZQChO9yCTO8O7xCPEmkNkWVfiX6fzx8CIwS/4DlwyMkzgRV0lombLhwp8pXLKML9 94PYgC0md4SUAaNC//HdjTTF8pF8vS/myfXiDRsaxclgJJ0ZCwpwMNNdVJFtcmxcDbOR zPiLcw84aIf72qOgxx64FSH+CEB3UKQIVCR7H39eJwITKUWNYW4K82rZ3dgjJHyR/3lL IA50A5WqqOUl7g3CT5gK4GUgyIofR9JpaDXudsK/jsIsF/FGaNYsXT75VOycGEeVYLEm iBVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=pGucN0PxFbjwvDzwiQXUgGyup1j/2BP5OwskMaqNBFs=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=OSx8bNZ1NwPl7is4kxaMoe6NFMBMVmz/Hfu1A2PVyNXpcvhf1LRSbbt9ojCpARIxWC FJfNJN1gS/J2xG9LjEYGQW7H5juHT/0DY+kUpWRXYlEImxo787S5FKOnFWgBc5k1By4h HO8NEEJzbI3IlTFyfEQlDY5Pm9hdBmFwg+bPvIb3X7IGNvm0DLfhwfOGp/9zsREU6phx 9W77qaJKNLhXHCs8kLwnsHAhDhpM8N2LOwnlgS+DaE0RhyNwdIhRP3tBnj9mYa0Z4ENP HZ6cThTCCLWBe5BuUA6DfVlmiB0nmgcW0tQV6EV7H4UbzfYXlsHtSA2huO5yk1IZ//gl SzcA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=GqQlAnub; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f8c160fsi1304463e87.319.2024.09.08.18.39.12; Sun, 08 Sep 2024 18:39:13 -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=@gmail.com header.s=20230601 header.b=GqQlAnub; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0B93A68DC67; Mon, 9 Sep 2024 03:55:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DBC3768DB68 for ; Mon, 9 Sep 2024 03:55:18 +0300 (EEST) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-42cb57f8b41so8006745e9.0 for ; Sun, 08 Sep 2024 17:55:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843318; x=1726448118; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=QZLfknP8JyH/f35KQeNolIdGJWqvkmbls2aAUPyW9Og=; b=GqQlAnubmFAL1tDjMFDJt45k7cShWElgRnyKQJ9DyHhc0V6ZiqVbpTyqCDfDlh8psJ 6aQhj29IpA0ASuzX1XOVyQ2GlgP4myMHd2Do5WT76QmfVZYHd8psRv08B1XhF9BaPTUQ 0nKaO1fZSihQCAqLvToGRnSrejPurc908cElKj0kw+8or2jhJ20evVf3kJM3zz7Wzhx6 OO/y9Jn8gNXJLm8vhgdHwxd5HWBFtbGdEa++oEu5kzjPKzQ3ECTVfbPCll2AqxwkCV+w 2h5ebWQ27GgIpXD+Oq4GkWvS4xewmXS1sYDDh+6kxuxUdIVn6ZlThbyoIRy7y1xRiYpa nSXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843318; x=1726448118; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QZLfknP8JyH/f35KQeNolIdGJWqvkmbls2aAUPyW9Og=; b=cZbqB9CUk6B/KLz64W1xFQ1yziwfElqqbluIuth7/LDubHuiV2opS3ElTFwGz2HR+7 jsq2wFislkXOGL9PB0wr4gmHjNTpupjaH0v47emIMBZk2hhpEmJXKQ6VmH8HeEVWzayS kYp6vpY74xP/LCr7Fwe0zkkSb1kdGOm/b8Wq0N+EuQKTjhpemghPDBvyBneRlHXTpQ8R ZJyid2S6LHbrCbSfSr/aTFza0aGkBzyfwcS+GtaTb62rcR8Tx22olL/Bf0HR1g18Af1H yQngy1TbA6JJUXUHGlewAl+D9BB/YTv1EjyWXqB3l9GwbIlHG+8HISPpXJulleJLwfM7 fOMg== X-Gm-Message-State: AOJu0YxeIQx1u0OjoHk2hb5xWUUGx/ypaywsw7S6rAgJoYddhXomPJVk 32bqqyqteYK46QiT665+PhxgoXCkiX7tvPzEmGab23OLDodjuzZW8cGCIA== X-Received: by 2002:adf:e949:0:b0:374:bd48:fae8 with SMTP id ffacd0b85a97d-378922b691amr5064938f8f.25.1725843318138; Sun, 08 Sep 2024 17:55:18 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:17 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 21:43:39 +0200 Subject: [FFmpeg-devel] [PATCH 18/60] avutil/file: use av_err2str to simplify code 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 8wD1orURiyRF No need to explicitly specify the buffer here as it is only ever passed to av_log, so av_err2str can be used. --- libavutil/file.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libavutil/file.c b/libavutil/file.c index 2d1063b6a2..db8507286b 100644 --- a/libavutil/file.c +++ b/libavutil/file.c @@ -60,21 +60,18 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, struct stat st; av_unused void *ptr; off_t off_size; - char errbuf[128]; *bufptr = NULL; *size = 0; if (fd < 0) { err = AVERROR(errno); - av_strerror(err, errbuf, sizeof(errbuf)); - av_log(&file_log_ctx, AV_LOG_ERROR, "Cannot read file '%s': %s\n", filename, errbuf); + av_log(&file_log_ctx, AV_LOG_ERROR, "Cannot read file '%s': %s\n", filename, av_err2str(err)); return err; } if (fstat(fd, &st) < 0) { err = AVERROR(errno); - av_strerror(err, errbuf, sizeof(errbuf)); - av_log(&file_log_ctx, AV_LOG_ERROR, "Error occurred in fstat(): %s\n", errbuf); + av_log(&file_log_ctx, AV_LOG_ERROR, "Error occurred in fstat(): %s\n", av_err2str(err)); close(fd); return err; } @@ -97,8 +94,7 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, ptr = mmap(NULL, *size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); if (ptr == MAP_FAILED) { err = AVERROR(errno); - av_strerror(err, errbuf, sizeof(errbuf)); - av_log(&file_log_ctx, AV_LOG_ERROR, "Error occurred in mmap(): %s\n", errbuf); + av_log(&file_log_ctx, AV_LOG_ERROR, "Error occurred in mmap(): %s\n", av_err2str(err)); close(fd); *size = 0; return err; From patchwork Sun Sep 8 19:45:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51410 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1363755vqu; Sun, 8 Sep 2024 18:19:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXDYjZLcMKNhhHA4DTsZZ/mHQw6wGfZEBm40SL77xazbiTUSIZMWfEpGUzZrr+gRH9ZOKGL+RGVjXNCNGeWGvBK@gmail.com X-Google-Smtp-Source: AGHT+IFvBKOom1ZYFLRp3A98PJUaP9xHHx2PJZyxf6APSjD6FWOS/hNc+oxHZFRBsyDWk01AgQqw X-Received: by 2002:a05:6512:1191:b0:536:5515:e9bc with SMTP id 2adb3069b0e04-536587fc7a7mr5354854e87.46.1725844752957; Sun, 08 Sep 2024 18:19:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725844752; cv=none; d=google.com; s=arc-20240605; b=Xhaws6mmSQ42J7w/XDaiQ90Ga376gbfYGpLls4zhU3B7JRifKhoWv5owbgGcGViSol sXcCmBK4uW7Qso114MFqclw/HnpL90/Alo1UzAeE1M7SYgWr2GrykPyjF9C9VwS+DSUv 6bDoAaz0CtIQPRBCzkkAtZklv8f0FpHlpkeJsxAcK50qKzBzlc+k/v5bN05p0w6sACdF wLA8u038PliG5xwINmIlU4/21mfwjttzQDScSwfJU95Dwi7vg/S9SwsTUVGCdKqGydVO Vr+AJAnEnS7Scpe444Gejx5jjN2kMCav925GREaL1JIdh/jXHZeClz4zoz4HDOCiNgZ4 3Pwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=ju4K05sghzio7RPvSc/l0ahJ0+UCXsRO5L4n5/FBO64=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=c7jZvjPkTl0iI+c++o/jGPC8cD06VgTXfKLIaIckqzAtD8ehBwTowYIQQpFWKiS11U V9xmDvQeog33awjwNEHblbevTdYbH7YCNSMx6aTQIG+isyahvT4RsGrXm9eNzo8C3Dyz lKpuwvdLhKXX7zSkhaEq7Ny2DWOIY24wp7Fe7/0nqhTz+mzLXzY6jKzYj092cM/IIv0M Tk8dhgn8lxW9NWmvjx8eyGVKJRiMtKc0eX4xRbZwCLDms9UlvS8tG3Ru2ASXF6MsxDQP anXDa5yh627J1ztFVTLK4MQMrzCMO6gABjdPg0E+1Oyidn2tLugtrUu+jBxonTb8wkRY gQFA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=H+nvyTRX; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f8f5bb4si1336828e87.393.2024.09.08.18.19.12; Sun, 08 Sep 2024 18:19:12 -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=@gmail.com header.s=20230601 header.b=H+nvyTRX; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 51E1868DC7A; Mon, 9 Sep 2024 03:55:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D723A68DB8A for ; Mon, 9 Sep 2024 03:55:19 +0300 (EEST) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-42c79deb7c4so31989585e9.3 for ; Sun, 08 Sep 2024 17:55:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843319; x=1726448119; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=qP1XNRaR0+ZmRZoCVHHvmezxMWAylW+jeTSq2C1Squw=; b=H+nvyTRXIhD3xmfTIbhE5wDSFG0sob9Sk7AYF7luDGh2CL+JWPiiBNl5CyDZXhx42K 1jTTYHZDA3/62FTsWHhVWUgOOiA5LtfKPUddc1cOdjzc/QJUYfEPbAfFpfkPcznQgER1 GpPsWKiCtG6pvm4ulf3WncA1KtgWxlFBwUfQ5vINBKTfIiPYuyRoG7EkzbO0+ig4NGql 4vkb66LEuuxcIEQuOP2hpnSPAuEVYgcjy8HLTygW52jdg9sfi/CteMP5oSWorWw708a6 w038IPKbznYd8TE/exo+lBKtw1M0pFoqFHZQ5Xt1ZT2L/d5Rzh9qRUV13CBtB2ZCWFLm 2zWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843319; x=1726448119; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=qP1XNRaR0+ZmRZoCVHHvmezxMWAylW+jeTSq2C1Squw=; b=q81JYkzRkWTg5iDmkofheDVsxDajJd8F112MeoCDIC5dgbibqbKJQMJRKq319+f3ZO /3+aQaAiss9s5uCjmRpsKCTGNf84ETCQyF6PDs5z1AGN22aOE+hXal4herc6vhe92+QJ IXHXi6saWUn9h8pbQplO604eLzUls+YIeb8ZmUsTfP/AFlFFoErKqxBX9B5z7o8D8pYs 2kVtjBT5IWhuhLsxN/2n/85xAKKsI6KU6RR/iJU5FgQa9btZHrcK45CLj2H1YIatTdVE v+copdi184s106dapI3T1L9TBTpkMDYgLg31o7oe6g1Th6WpQLs/ARht+4vLbjdw8u+L yJVQ== X-Gm-Message-State: AOJu0YxEbvD8rAfjqssj57xUhvO1ig0n4tBG3RnBkxik3SQId7iKnZnx /qflywAO5mKcyS7HLFC+dnOC0z5ZqqcO7h4d0LsDz4XeJLRKpaBGWoOgMg== X-Received: by 2002:a7b:c858:0:b0:42c:af06:71b with SMTP id 5b1f17b1804b1-42caf060978mr33980965e9.28.1725843319043; Sun, 08 Sep 2024 17:55:19 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:18 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 21:45:24 +0200 Subject: [FFmpeg-devel] [PATCH 19/60] avdevice/jack: use av_err2str to simplify code 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: pjHsw6yUjbqd No need to explicitly specify the buffer here as it is only ever passed to av_log, so av_err2str can be used. --- libavdevice/jack.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavdevice/jack.c b/libavdevice/jack.c index d52bb06822..bb06971fe6 100644 --- a/libavdevice/jack.c +++ b/libavdevice/jack.c @@ -291,11 +291,9 @@ static int audio_read_packet(AVFormatContext *context, AVPacket *pkt) av_log(context, AV_LOG_ERROR, "Input error: timed out when waiting for JACK process callback output\n"); } else { - char errbuf[128]; int ret = AVERROR(errno); - av_strerror(ret, errbuf, sizeof(errbuf)); av_log(context, AV_LOG_ERROR, "Error while waiting for audio packet: %s\n", - errbuf); + av_err2str(ret)); } if (!self->client) av_log(context, AV_LOG_ERROR, "Input error: JACK server is gone\n"); From patchwork Sun Sep 8 20:20:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51432 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1396438vqu; Sun, 8 Sep 2024 20:24:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUwhVloqnndtcnp5ZwIB6p8JtAEpzTJg+ftAfA4hAn/yJW3VTH1+LFNKBrs92H1VNTBdi1AiRr1pmKUR8RTD79O@gmail.com X-Google-Smtp-Source: AGHT+IGPMdrBbLHtK+nm5zkrF5S61Kp8hIXwScWAD86QPSt/3uIuhVf5J/pok1ZiJfSquyqZiUO/ X-Received: by 2002:a17:907:9621:b0:a72:499a:e5ba with SMTP id a640c23a62f3a-a8a888da9b5mr269109866b.7.1725852249928; Sun, 08 Sep 2024 20:24:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725852249; cv=none; d=google.com; s=arc-20240605; b=kKQ6tMOJhlxXEufvZjXZWFaC6XruyhZIJGretF3h2z9Uve/Aj5zBggmDPV4VsbDtsl oBoOs4eSmNZn771M6uacU/gHT+fNVvA30T0ILkotyyYPNf3OMkv87G6ym6mraKVeBer2 YXtiXMh1WGPhsGJbJQRqIyfBD5UrYzq5z+H78juGUNpn0Wyu0g8h2N3JM/RGuBCV+J9M GjG+iFSIofmZOyBDZUgrXCb0LZT/djLfncO7GYxCc4A2NfAk0tbZUItF6UTcIgqQJ9Oy GTJcx1971iyce115BM0YWcfJOPc7eXKzP6z9sPEPyhKE9jr7nyv1Rh/JTSaWfaHHZDHC HXoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=lCWBFRT7K1scU9prFkHtd9o2FZGqDr2kNxBZTWQw1YU=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=alEUjiwCXKhMQw80I6hZwobA69DqeJlqdz2sZqWj+j1tQj3nIw0GzSHY6rfoAg8Wst FzW5U7MOGCL3M++cUm+XB1SXPE7QJiEEjJmIyVVGsJZ0PJcVMTEdW/sFinG3g6Istge4 n/Kecx07TmVut+g+3S1YT71/m7yfXgHpdFiBKrkQu8qcVUWVAZUNSLRn9sqvKwblTCFt F98FmbI+Ac/TnhCQLJY8u5DNw6Y7WAD9qTFvGJL9UAj734zSBECKPTwPIKaCGpklRafP iP1afCBUVzcPHAHHsZnglBYLwbMV2kx2+Linhrbc+p+i65VUOmsfY37T//gy3s+DdslJ PpWw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=GZvvs6aF; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25ce9ef4si315899066b.658.2024.09.08.20.24.09; Sun, 08 Sep 2024 20:24:09 -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=@gmail.com header.s=20230601 header.b=GZvvs6aF; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9CEFB68DC5E; Mon, 9 Sep 2024 03:55:33 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C961568DBB0 for ; Mon, 9 Sep 2024 03:55:20 +0300 (EEST) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-42cb0f28bfbso12100775e9.1 for ; Sun, 08 Sep 2024 17:55:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843320; x=1726448120; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=LWMZiioVi0F133wOuQ80/E546MOImzvfFGzXlpERpW4=; b=GZvvs6aFsQobufYSnGf0mW60udqHS21RQ9iA6o4ZGIY07yAjKK5LEH13bwe653KY2p 6nlEKwNy5COza3eucXbOujM9bkjBk8qArxHLe9gD3xAA5+pHaS/VeCQ4vNRvyuJULg6q wSCPeNKco2Y8TL/XWZspaPBJqcEZJkE1H1TylCaA7kOsNa5EcbyXC0m48eShGHenol+7 c351vQ0S/0f+TOGAlV5oqf9ZJtn0rZrK0cSBvJnvaAICZsTVmz276QvpjUBeScUV1R1d 3cOE+KT7TijOJT/v3o5KjZ0grO74QO2q56Rw+4Q+lTa+y/w9i4JVfoMxFP+lfa2eQAh5 +Kng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843320; x=1726448120; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LWMZiioVi0F133wOuQ80/E546MOImzvfFGzXlpERpW4=; b=XZlZI9eVG/zoxe5JSdaKW/WfLK3XnQ5oyGWQ6i4JYR8Gx7TWxnqzeuwWdFXwOG0kPM qo/65ZAV8dE0bV/NmiTdEVJjIKCm1v06ljIgFgob7QeFArIpHI2ts9T4ZgzcpGc+ys+b cBFDwESn1ChJ9S3CSzC5lPgiqMvfewTy1814cqRALnPnyP3WcwHDQucL+vY1f/ylxgYM RL8d62BRLutrJXNES/b0te/Yn04dzWDOdwtBdyf3nNE5z068tRVk0AFB6hsjQzsPy1J3 /fKFSmi97QgGgYYLEHjab5ys0c+QVwThBmraRwnAXz9x9d6NVAM3c1m8Iid4Vy8OQtRd GfRA== X-Gm-Message-State: AOJu0YxEsStgLht5+oUppSwEcFqbN33V0nQtN1Y+8yMdZNf9rP2teh0b 40msAOqWAnYg6zuYBV6Gn5zKmBEkJmXwwLZFNA7PXNlOiqphCqox99zYAA== X-Received: by 2002:a05:600c:45d1:b0:428:f79:1836 with SMTP id 5b1f17b1804b1-42c9f9d7338mr72827495e9.26.1725843319968; Sun, 08 Sep 2024 17:55:19 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:19 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 22:20:42 +0200 Subject: [FFmpeg-devel] [PATCH 20/60] fftools/ffmpeg_mux_init: remove unused variable 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: qTiRXWu1xrkd This dict is declared and freed but nothing is ever written to it. --- fftools/ffmpeg_mux_init.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 37d626add6..8d475f5b45 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -915,7 +915,6 @@ static int streamcopy_init(const Muxer *mux, OutputStream *ost, AVDictionary **e uint32_t codec_tag = par->codec_tag; AVCodecContext *codec_ctx = NULL; - AVDictionary *codec_opts = NULL; AVRational fr = ost->frame_rate; @@ -1019,7 +1018,6 @@ static int streamcopy_init(const Muxer *mux, OutputStream *ost, AVDictionary **e fail: avcodec_free_context(&codec_ctx); - av_dict_free(&codec_opts); return ret; } From patchwork Sun Sep 8 20:21:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51407 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1360796vqu; Sun, 8 Sep 2024 18:09:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVUeBFhAF+P/OnSPTPD6Vxn2LA45bN6zgFD+30nfNEEE5MnN5eb268ljyDQ0fInY1jXvFFkSYwgt7tp/c9QU+PP@gmail.com X-Google-Smtp-Source: AGHT+IGt3O4PqA9BYvBe+VIx+tYZRqHATyOdTEraoPYETWKr49prZaXZXx3/bmbzwmE10ILlu1xv X-Received: by 2002:a05:6512:1388:b0:535:4144:bf90 with SMTP id 2adb3069b0e04-536588198eemr3295940e87.11.1725844150987; Sun, 08 Sep 2024 18:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725844150; cv=none; d=google.com; s=arc-20240605; b=Mkc0l92SXW4hfee+o3rz2wsTAo8X27mNU/Bh7ZCvXTzY1dIewo7DVHsLPWGgqN/1dS CEfN+/S6Et+p5wpdUUo9TUq7evoovWgwsjC6tVJv59MDMGqGXM8Yq2RCloDnpKHdVT5M C8BEmdTOffYMuderSSyzaGlt7bK22034wdFpCPZ6lMYu7kUWGHiH6Pmh/J6QYELg1r+J jAmIoEAQLjuLPHLLH0gF2C0ViHC+cAaMhyMUGuzazrRtnXTRm1GdI66keg+IVi23ksTK u1Em6cO10bInOAg8BSE1EgKM63vxbXYSqP3d0neOvOi+CkbBtjTxwAdAdhiQzo2ydM9O imFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=/2Evg/Y0CcvyTKWJmU+8kRsJs0wXkMqSvmeW96ba8PU=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=KXUh+FCwdu8KrPddQ/rpuF0mio1ojkxDz9dkhRPsALhL69wzlk1yAMw54UgmOv97PU YDHRHB+trvjC/7lw2b3AdiMJSpvOAlGsSoSZBncXZUZtlOixu+GeUxhxT+Yl+RHYpzvd hB+xHYYsTKC6fBhqPUKXBXZ7KKAfI8dQgXIjuEIvkxY7WnQ015V3dhzsESPIOrTMt032 EYUqy0ymV2xU/p3r6lHYFpTgQ/lvsO3GAxnOYaIbly+RuZokgTcOijY+4oJ1tHB+VApE 2dYN35KpiaWkrsoWzNozBrYZY5y2V40oGL6pkA49/ucbwTaXogZUs5ebD/ScEx8oA2TR ztkw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=ewsDorT5; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f8c1568si1358974e87.267.2024.09.08.18.09.10; Sun, 08 Sep 2024 18:09: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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=ewsDorT5; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2413F68DC7B; Mon, 9 Sep 2024 03:55:35 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 981D068DBB8 for ; Mon, 9 Sep 2024 03:55:21 +0300 (EEST) Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-374c6187b6eso2252117f8f.0 for ; Sun, 08 Sep 2024 17:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843321; x=1726448121; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=wCLIGWCD+LiJqdxNwHFO0qsNxW6ojn2uFnUA9G7c7SI=; b=ewsDorT5LBVrEjUK2nbnNRXy4RuuWEpNQUWx6e4QoLuFSbxHVAoCjZUjCMmcrETOPy MK4nLScxniZEDwlKO8RM51/df/gnIyZ+FYddB0jjowgYqKvXpNpPJUj8xEUdmfkfAKDG 6PHJWQrDVBOZi/prhf1pareSyqgNs/3djlBpaCdjpc49yMMxnzi624glkEjjzS/MB6JC 4ypfHsDlzJeGXtBPf1EF/z9s0XxH4dh8cjMqokFP+EhlnDK09pqvaG6VSVWfJer3/Fez o5IemYO4LJxVjAqZ3QfrDS1uihrvYWc73n1tgz0Hbm2Er09gI3toV3A9Cmqi50b3hw2L LJ1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843321; x=1726448121; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=wCLIGWCD+LiJqdxNwHFO0qsNxW6ojn2uFnUA9G7c7SI=; b=WIVYb34nYAlzzlaEC49tryiGqZc4p0g5SUylzI3KZSsmD1w5DivtyEE8OfARiiX0T+ qYU89mBDvVNyR6Gwgz4FQgP0d0PyhQ5tXMhYktVyZ+pQ4ZiAioDKggVr7YTdHnny1eh8 cGJ6Sz0DgCCy1H5E1QUoqE2NUAewM6JRB11847jlt1WCk1IQNQ7rRBNDE9sOmbTgVtVn j2wDmnQfF0yXkWE9sBeu+Jf1iqL6DqnY6Tk01PDJDQclMzovQD5Ny36GhjRXBZozlRAA ygL392W1OayB4WuSq2AYtqfYmjmVKNrZZ4KDLVD6RKtdLNcPWndcpzhBkMKTlMd3iHZI cyrA== X-Gm-Message-State: AOJu0YwDMl1HBz3HZxicqsmdfuPawEfn3gLXp0wou/k9k4qdiP+fr70F +FTQRv33VRZ1hmZndp9jKodVQLM/QY8unBBrjXkMSDM4ruXE67XnfbI0HQ== X-Received: by 2002:adf:ef87:0:b0:374:ca54:4065 with SMTP id ffacd0b85a97d-3788969f9f9mr5297437f8f.48.1725843320923; Sun, 08 Sep 2024 17:55:20 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:20 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 22:21:03 +0200 Subject: [FFmpeg-devel] [PATCH 21/60] fftools/ffmpeg_mux_init: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: vYnQIpEUWHaI --- fftools/ffmpeg_mux_init.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 8d475f5b45..c2867192ee 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -661,11 +661,9 @@ static int new_stream_video(Muxer *mux, const OptionsContext *o, } opt_match_per_stream_str(ost, &o->chroma_intra_matrices, oc, st, &chroma_intra_matrix); if (chroma_intra_matrix) { - uint16_t *p = av_mallocz(sizeof(*video_enc->chroma_intra_matrix) * 64); - if (!p) + if (!(video_enc->chroma_intra_matrix = av_mallocz(sizeof(*video_enc->chroma_intra_matrix) * 64))) return AVERROR(ENOMEM); - video_enc->chroma_intra_matrix = p; - ret = parse_matrix_coeffs(ost, p, chroma_intra_matrix); + ret = parse_matrix_coeffs(ost, video_enc->chroma_intra_matrix, chroma_intra_matrix); if (ret < 0) return ret; } @@ -728,8 +726,8 @@ static int new_stream_video(Muxer *mux, const OptionsContext *o, FILE *f; /* compute this stream's global index */ - for (int i = 0; i <= ost->file->index; i++) - ost_idx += output_files[i]->nb_streams; + for (int idx = 0; idx <= ost->file->index; idx++) + ost_idx += output_files[idx]->nb_streams; snprintf(logfilename, sizeof(logfilename), "%s-%d.log", ost->logfile_prefix ? ost->logfile_prefix : @@ -1145,21 +1143,20 @@ static int ost_add(Muxer *mux, const OptionsContext *o, enum AVMediaType type, return AVERROR(ENOMEM); if (ost->enc_ctx) { - AVCodecContext *enc = ost->enc_ctx; AVIOContext *s = NULL; char *buf = NULL, *arg = NULL; const char *enc_stats_pre = NULL, *enc_stats_post = NULL, *mux_stats = NULL; const char *enc_time_base = NULL, *preset = NULL; - ret = filter_codec_opts(o->g->codec_opts, enc->codec_id, - oc, st, enc->codec, &encoder_opts, + ret = filter_codec_opts(o->g->codec_opts, ost->enc_ctx->codec_id, + oc, st, ost->enc_ctx->codec, &encoder_opts, &mux->enc_opts_used); if (ret < 0) goto fail; opt_match_per_stream_str(ost, &o->presets, oc, st, &preset); opt_match_per_stream_int(ost, &o->autoscale, oc, st, &autoscale); - if (preset && (!(ret = get_preset_file_2(preset, enc->codec->name, &s)))) { + if (preset && (!(ret = get_preset_file_2(preset, ost->enc_ctx->codec->name, &s)))) { AVBPrint bprint; av_bprint_init(&bprint, 0, AV_BPRINT_SIZE_UNLIMITED); do { From patchwork Sun Sep 8 20:26:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51421 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1373337vqu; Sun, 8 Sep 2024 18:54:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWEAvYZW/C+d8TTZcOIzOzXtqKu1h2AtC1eowdbtVDXKkNMTIcDEQXyYWcUci1sdhNJwRIjy/zyZ2P/4Nj5lrmo@gmail.com X-Google-Smtp-Source: AGHT+IHkyEAwTcfIG6yEg6u8ahVexpzU/o5JstQaOSl7LmSv1e32EJxYoJsuOVEBxEnz+MmFi8Hj X-Received: by 2002:a17:907:1c2a:b0:a86:7021:1368 with SMTP id a640c23a62f3a-a8d1bfcb564mr797617666b.21.1725846851750; Sun, 08 Sep 2024 18:54:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725846851; cv=none; d=google.com; s=arc-20240605; b=Irf3j7oThIEN+VZMWsNWeqRtOz7nMNvxLgJ7GvnrYnLCBBkCbCfSzL+trvu1bSHQ9S WmaWG/P/mqOVR84mZp2aC25bje6KnZSDX8r4qPIzk8YWNG2Zk9ZU6ECtRdbnf4DXcdkF W9cFgvfAlkSa/f68/vbxa57vff5rUWD1sHBO0LUVFTZopZnlcvoh8jHHC63tch5T+zfO /pmPnWgs4QqV89rwqr4VtfkQk2cR45QFdBDrB3SjY3yZasKY6ARBoWqFS1lIUSCPj+qQ 0QkX/R9193d+yML555lxapXl8a/i9iuRHr/1yq7Ithm9Dg2FF6KxqXWIp5c4mbDto629 WnNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=Da+K1724SyeTvFFDke4v7V4dK6S8BXwKzDWGs94gWyE=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=G1kNDuucQt7QlK93oL2m49/WIe6ZmVJg/zK0E0jvrHJIav4JClght/QjbTmmx8xfYj +TaQMG/EzRZ0UbFx+9NbvYww9abFPdBzLKY9rTNLKHYHZLePEJ2Lvsz675RwcLhURfzP Z2Gj9+eLA4Ka8wy++xY23bAqE3lNsQxvhYZp76a+1v3/DZp/9DSEOto0w2hhSV4JgnMW NM/wJU9SdI4++hAkeOz4eTOVtv0iuxiI9fuFqI8fq/nhLMBOGzzzEXX8pyUhxo0a+oQI IMpWeV6bffpZKeNO0hqBoZ1hccJkkYwWpSV89BQEEHDH5VbjSBFpFD5clLq8NvOvE6je vU8w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=Fy6oHWfj; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25856a8dsi297409566b.23.2024.09.08.18.54.11; Sun, 08 Sep 2024 18:54:11 -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=@gmail.com header.s=20230601 header.b=Fy6oHWfj; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7998D68DCC3; Mon, 9 Sep 2024 03:55:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7745F68DBC5 for ; Mon, 9 Sep 2024 03:55:22 +0300 (EEST) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-374b5f27cf2so2159618f8f.1 for ; Sun, 08 Sep 2024 17:55:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843322; x=1726448122; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=5uHG9OuMGVOWyHDkg08V7srIYxhueHN+aHxxisxoG50=; b=Fy6oHWfjrk/weW1vVyWnzZbOHBLoSlWUTp+phQOoJdkmTQnrHWNyaWxVmnsfWEy2i6 ZdUwZmwGVsHvV7S7tA4Upch70BxBRj48CZE+JVYMS1l6Ip/eB3kZmTkg87kFjiXZMc1V p0ejxuM8n/W2efCZ2m8vkJJfrv5I8vSz8+hPF4hY1B3eO1uc026G0S/X6zNqT0VPmnSj pB8/xFLnrqpNdiqVIfLQWYcWeNQPaYZYyC1cnsclgNCQKqCcdF8eRPR6uedZ2pGGDwhs jcLQSmu0TACL3iYnvJg4LK6tnCsobcQTpQbQQVSqO6wyfnnAHoRgzJuWU7PvQDiWqCUi 0nyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843322; x=1726448122; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5uHG9OuMGVOWyHDkg08V7srIYxhueHN+aHxxisxoG50=; b=TuWm6+btIi6VkxGrk+1PvQJ5DDzrTmT71zVSGJKE80JRq+f7IHNA09SWAts8krEZTo qtHTHz06DB8fDA3ni2YO3x6P/U70BJuGE+/eX8pmPVh5KktnRBQAYgoq8+gckNY+Lfm3 JCW9HZMmV+VZcw/0n+UOUBnGS2Kgm60xSqyCcuHgkZYnpkWUwLDgRRl0pFMGTfhJX7bt d2LTtES/89eRaXsydS1x378DI4nJ/DuaWg2wksQT70dHhj8roMKzyexnefT8hd6lEp7y PHF1Kr0Be39AHcPmhKK+fqOKWQApwFwdkd95TNwOaCqLVTNrZHYM2uo7yfGS1xd8XmCn eU4A== X-Gm-Message-State: AOJu0YxM5sRGb5Nn/pdWWeqiO7sMPgJ7ojAJqkV5uWeRjDWGO9hlpDgV gR8w1YzijIDMc5KiTxr4pwiM4iS2cKeMtSdOO/X8oJxb9lBKn18Ug6YFdw== X-Received: by 2002:adf:f003:0:b0:374:c56e:1d44 with SMTP id ffacd0b85a97d-37892703ef0mr3178902f8f.48.1725843321831; Sun, 08 Sep 2024 17:55:21 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:21 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 22:26:09 +0200 Subject: [FFmpeg-devel] [PATCH 22/60] fftools/ffmpeg_demux: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 5m+AKLwEBadL --- fftools/ffmpeg_demux.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 039ee0c785..18938f1f12 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -1597,7 +1597,7 @@ int ifile_open(const OptionsContext *o, const char *filename, Scheduler *sch) InputFile *f; AVFormatContext *ic; const AVInputFormat *file_iformat = NULL; - int err, i, ret = 0; + int err, ret = 0; int64_t timestamp; AVDictionary *opts_used = NULL; const char* video_codec_name = NULL; @@ -1752,7 +1752,7 @@ int ifile_open(const OptionsContext *o, const char *filename, Scheduler *sch) return ret; /* apply forced codec ids */ - for (i = 0; i < ic->nb_streams; i++) { + for (int i = 0; i < ic->nb_streams; i++) { const AVCodec *dummy; ret = choose_decoder(o, f, ic, ic->streams[i], HWACCEL_NONE, AV_HWDEVICE_TYPE_NONE, &dummy); @@ -1772,7 +1772,7 @@ int ifile_open(const OptionsContext *o, const char *filename, Scheduler *sch) first frames to get it. (used in mpeg case for example) */ ret = avformat_find_stream_info(ic, opts); - for (i = 0; i < orig_nb_streams; i++) + for (int i = 0; i < orig_nb_streams; i++) av_dict_free(&opts[i]); av_freep(&opts); @@ -1813,7 +1813,7 @@ int ifile_open(const OptionsContext *o, const char *filename, Scheduler *sch) if (!(ic->iformat->flags & AVFMT_SEEK_TO_PTS)) { int dts_heuristic = 0; - for (i=0; inb_streams; i++) { + for (int i = 0; i < ic->nb_streams; i++) { const AVCodecParameters *par = ic->streams[i]->codecpar; if (par->video_delay) { dts_heuristic = 1; @@ -1887,7 +1887,7 @@ int ifile_open(const OptionsContext *o, const char *filename, Scheduler *sch) if (ret < 0) return ret; - for (i = 0; i < o->dump_attachment.nb_opt; i++) { + for (int i = 0; i < o->dump_attachment.nb_opt; i++) { int j; for (j = 0; j < f->nb_streams; j++) { From patchwork Sun Sep 8 20:27:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51413 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1366667vqu; Sun, 8 Sep 2024 18:29:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWeRTY/jrKlCvRjyLnghqIgM0zQ2yipFrtszrc+dlQlsKaKkTK03NDMpXht7SXpI1LvpagCiRn3rUWzle4l+zPt@gmail.com X-Google-Smtp-Source: AGHT+IH8yv6GIqHDKa2SvtvoVhN3BwHe9vgn+nlVKD+ncdWAchK2IHhUDXmJElibrlDYnuuDLdbQ X-Received: by 2002:a17:907:2d92:b0:a86:8b7b:7880 with SMTP id a640c23a62f3a-a8d2494c0e0mr370252866b.63.1725845348950; Sun, 08 Sep 2024 18:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725845348; cv=none; d=google.com; s=arc-20240605; b=F4NpiGo/B7B7L58oBZRg7N6gF4467g9mnzYcHb+xxYFE8ZyRKsXFvhJAfHggc9mdG2 IBQrBk0qDk40eJKmGeyS4bh21nmKrVOO+ZJUOjeNk/oXfaOsCTvOax4HcaF4vuVxTm8d aU0r1w7MQBXQTcNZtxMiqumPiJ0YzpNrEonYJbu7q5jtl3IjuWPHIBV9+4XNJHRN00iD +Uy0Q0QkWAqHi/yml99rrbtHrbaTIxxO6fHw+1nsEtgUpSU+pTS9+UI9ToyXVE2cTtmi ORNvkWbP3EMiQTq3QLI5I4bZyntFjyvct+cJsQxI8kCpeutPnUHEF34tz4Cs7ZH99qd5 /aZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=ayVObKCPEGdu1+6ZxL3AGGnlp/qqU7gZ27LwQqcy3Ps=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=DFO2IA+eBFADDhMqOvO0De6HehMgDpy1iDGTQEfArLCzJOSaXoeCn/h7MJwTlqqEoT 8YAPu+g8GUzuP5jxl1W6gN6MDCv129eXSYQdHBknbwkrXNnjQAaL4YBBzdDsQJteu1xs DWeTjpPRz1U8W8V1pVkkCGWGzJ4alo6ookDMy65Jp7pV8il1hs52jgq7GuV4nyQdiERB xSzugIFi8NibBLJ/Pe9kwrVkvNSq4BirjAywq1KlJKrFRcv9sD3/gjsAIugWb5KWb4Zv 3woNwOZuL1wgRZgu6X7YJu1myjgdev5zcUbU854Mcu+xDCFc4qkY5tOMV7GHeKFu3DgB wkMQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=G+jxFJUQ; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25cf94d3si293762666b.621.2024.09.08.18.29.08; Sun, 08 Sep 2024 18:29: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=@gmail.com header.s=20230601 header.b=G+jxFJUQ; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6099868DD03; Mon, 9 Sep 2024 03:55:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7247968DBDA for ; Mon, 9 Sep 2024 03:55:23 +0300 (EEST) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-42cb1758e41so11466605e9.1 for ; Sun, 08 Sep 2024 17:55:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843323; x=1726448123; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=MHUqvJ52xpzRpRN09RtdN5AxFgp6DSopvH3xBP6Gvk4=; b=G+jxFJUQOxwn/xaMchxqh959+a/wplHrxRdTCWEZaCrZvAgnf79jJfGWF17zegDvvp diODHyXtZIxU0Vb+AnLoac0DeFFmwmKIOKiAFTVdXPnwuskHRlq3N+jAcj0Ocyp6degg pb5QAb9efHrafLh7m0LwchtnfV9H37aqjCL8/nnHSquO2TNDc6JfcBDdItJZdwi+4djE FpDUoWsLqpgfwcXvJ7GjVAJn4XaD2BRSCzFYBgrT/NT5AybYMXvnkb5GCu+VcKmw6lwY WiUCB7ZKeW+S1KfOXuZfNrUkBipAQwh9FO1HG3VnG7WTxJ8MiJORAHarBp/yKrfICwXT e9ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843323; x=1726448123; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=MHUqvJ52xpzRpRN09RtdN5AxFgp6DSopvH3xBP6Gvk4=; b=oof6rGJR2eUBZTqgvUwVolphX4qlb4jsrHQU9Z69AHE2Rpuhs7JqEmIjilryZZ/RlZ 6pa96GCiq9Q+LfPXRAImtwvpKs7NqnytdyXIVxi2HhbXxFz6TBAb74Tk2akGL+K0FslD 06wmte6WMJ/Y5soK6Pfji3/S0RvL9epTUvKmp1qxQGMVX46U8cwWlyJvIPjsSXz9IBfs NbvihJ5FhPURRXcH/kJWcorpI/yDR1fg3fNXxcOlE1G6eko/ChBJ/PuMkfA/7RHefF9+ +mTflr2Oge/Ge5TFGCGILEpVTF5URTS9wA6EqjahV44lM64RNG42+1IMM0YYzx8GGGRl vWeg== X-Gm-Message-State: AOJu0YyRkLbTb//ftdemZLHI09klApu7PG5bJ2jb4p27vpAL77FJ11kQ 6E1zfCQZtC2rJzqKFdaIOI9wxa2nVKL3vBk05HVCXo1zSgUJOkZQ4gtfig== X-Received: by 2002:a05:600c:c8b:b0:42c:a7cc:cb6d with SMTP id 5b1f17b1804b1-42cae70a2a8mr40339985e9.1.1725843322775; Sun, 08 Sep 2024 17:55:22 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:22 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 22:27:44 +0200 Subject: [FFmpeg-devel] [PATCH 23/60] fftools/ffmpeg_demux: narrow variable scope 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: UFHNMyXOd56y --- fftools/ffmpeg_demux.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 18938f1f12..0b639f2b60 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -1888,9 +1888,7 @@ int ifile_open(const OptionsContext *o, const char *filename, Scheduler *sch) return ret; for (int i = 0; i < o->dump_attachment.nb_opt; i++) { - int j; - - for (j = 0; j < f->nb_streams; j++) { + for (int j = 0; j < f->nb_streams; j++) { InputStream *ist = f->streams[j]; if (check_stream_specifier(ic, ist->st, o->dump_attachment.opt[i].specifier) == 1) { From patchwork Sun Sep 8 20:50:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51429 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1393854vqu; Sun, 8 Sep 2024 20:14:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVR2ImtH9/g3OgGf3Ykq4P0UBI0bj7rwaGcUbqFZT3wB/JS53mlg61g0J3YGftYqATQfK8J1Js+TPoTXVn5souu@gmail.com X-Google-Smtp-Source: AGHT+IH+GhK3mzxJRfc8qzWHERdzQfSjKYEcf1manvGJB/gterafdtmf4jv0STVE/xVpDCgtTW7w X-Received: by 2002:a05:6512:1395:b0:530:db20:1f0f with SMTP id 2adb3069b0e04-536587a847bmr2680762e87.4.1725851649400; Sun, 08 Sep 2024 20:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725851649; cv=none; d=google.com; s=arc-20240605; b=TGmhq3vkEBkABSGE2PaDAHPpLPuWHVgfMsBf+YvamwFtXbszo7ZclxmREFZ5DwTQSI CoN539StQmtbEiC2wX7M9ZFKnxWBs4ITbsOqBsye5qd+yMFCuoeAy7DFqBHrZ4zcmMrd XjHOk+q/K0XG9rFBQ3u7WWCfLt6GKg5FPjWWzcXi012OP3RUK3w1Agk2YT5TZRFf9B2+ 2l/IeRiWt3SeHH5SBeDY3AZSBfdWixInYhNASrnL3w0XksGVVqAquWAarmjP0kR2vk7a 1iVToTOoc7yvIACD0CDDVvWE8qe7E8rJnCAiaF/VWRwxx2VfDzHGUI0A1MmX9+u1cCU8 BBQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=+dzzX9UQab/PX1euwwebT1RFX4ZHV8Na49VBG7HOneU=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=XaqRmE5wmyV0BU+d41rxquQn/o1u1njjhkUiccRAV+Olb1fJQGlx52ABUMYGc/vfz+ 6xb4k9wKqZgzpThCvBJeYOw0F1WLBvjVPJaxyuIaoHQ5K8EvrwGT8VsiTROJO8xE7mRu YT8mx+EVF62rgIZKWMD2gqA2X1D3eKvZfkh5nbPmwktkb1DyJdbM4EjSR4xngJ3Q13Xe 2z3kyep4jkNIdPuSVaudkXS09MLTRaAh129bPXfRFG3t0+NVrlHnM6v0PmPqJS9J+gSk W/LekAd2dJVV5Dg4dcmeQ6CdTrvKER0dubaNVxTluDGKjfX8mKhVtgWtQw8J/HCiWTkA FMow==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=hgTPglNz; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f86ece3si1343137e87.147.2024.09.08.20.14.08; Sun, 08 Sep 2024 20:14:09 -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=@gmail.com header.s=20230601 header.b=hgTPglNz; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AB9D368DD19; Mon, 9 Sep 2024 03:55:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 643AC68DBFE for ; Mon, 9 Sep 2024 03:55:24 +0300 (EEST) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-42ca4e0299eso15779035e9.2 for ; Sun, 08 Sep 2024 17:55:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843324; x=1726448124; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=qGBUsLzPMGl3XuYY9ZELLgsiTyj5fqN1QigYc3V0tRA=; b=hgTPglNz6L+7Eo0ABqyZoBUnUHXLHprf6XugWdHUPNbL/7/eYigN3DROmuLbtYhT5S jIi4I1G7jTUXz4v4X1oNT7oy+7DIrOX1RA8eO+DOHZQBxOR/0/3QVf1n6z0HBcRI/5Gb Ih/IZ64aIFMz53W5tvCh/qiq4NhHgFoZcK1cWkqqbH1U04B7Ct73OxqzQWFKQsq2M4hx +fmdjOovquAzXX4/Evf4qE6Kx5NGwSGzQuaMPD2W5gSmPgaQdIeo2rzyF1Uc58dVv7R+ IHR//Fx6dddo3adlcfxMh4BVtvhth1UAtow6StNXVxhrzqNnPHmo28Lge/dW96ITL2zI /Szw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843324; x=1726448124; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=qGBUsLzPMGl3XuYY9ZELLgsiTyj5fqN1QigYc3V0tRA=; b=jd+IF9wTJmOJDfS8z1ODvk3y/phW7NYopIj6rZkT73hmv+ehXpHb3RTrspyuqJeVOw /4PBl3xc05UvuBjz+Gzbvyy+rYFEVDmw62qq6UFY59AzMNbDPp+LtaNyfIEb1kE+57CX 8aB/O1wgiTb/S6hAmUyCWMxwfvuT7QytOg0XEpCke+t8+vng9ms76t0amXmiF0wAX5mU 3K62DMnakmzPuMhdRvrashIB+Y1iwqjWiiSG+1i6i7+A1suOcqvHitbF7Z78dYPAOUtP ZSHdG213AZtTluNHukFuC/1muNTSNDCC/4CwvBlIqWztF1Yo4Rt3DyIHpAJV949P8eWo JLgg== X-Gm-Message-State: AOJu0YyK5jxH2uELoxeWRylwHKNQ7slCXJze6bslOpS/24Ukh52z0KnI QSQ3VRMLjuw7PpqDjP2L2H0qUwkJPv248yOUCpe8/zDcUFoAXHZAbV4g5w== X-Received: by 2002:a05:600c:4f16:b0:42c:a72a:e8f4 with SMTP id 5b1f17b1804b1-42cad760ee2mr46632525e9.14.1725843323696; Sun, 08 Sep 2024 17:55:23 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:23 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 22:50:45 +0200 Subject: [FFmpeg-devel] [PATCH 24/60] avcodec/libx264: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 1M99b+RwiAhn --- libavcodec/libx264.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index d07a65a103..fc0f182bf4 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -564,12 +564,12 @@ static int setup_frame(AVCodecContext *ctx, const AVFrame *frame, mbinfo_sd = av_frame_get_side_data(frame, AV_FRAME_DATA_VIDEO_HINT); if (mbinfo_sd) { - int ret = setup_mb_info(ctx, pic, frame, (const AVVideoHint *)mbinfo_sd->data); - if (ret < 0) { + int err = setup_mb_info(ctx, pic, frame, (const AVVideoHint *)mbinfo_sd->data); + if (err < 0) { /* No need to fail here, this is not fatal. We just proceed with no * mb_info and log a message */ - av_log(ctx, AV_LOG_WARNING, "setup_mb_info failed with error: %s\n", av_err2str(ret)); + av_log(ctx, AV_LOG_WARNING, "setup_mb_info failed with error: %s\n", av_err2str(err)); } } From patchwork Sun Sep 8 21:03:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51412 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1365311vqu; Sun, 8 Sep 2024 18:24:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWsYc3GoQSfiBTk8z9szXZ9xGZCQXS2Vr4f3vdRseeBqrTIRsbMuruRfFDuAuN9/Au2BO77nScGjLxLnHSewe3e@gmail.com X-Google-Smtp-Source: AGHT+IFfpBQybA841o0mqk2tVXQLmpt324TBlrdD1XLFMmOMzSgIuWsJGal3tnecHpXmKSJrwsXS X-Received: by 2002:a05:6512:ba2:b0:52e:eacd:bc05 with SMTP id 2adb3069b0e04-5365881b1cfmr3887905e87.61.1725845049368; Sun, 08 Sep 2024 18:24:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725845049; cv=none; d=google.com; s=arc-20240605; b=WcnXHtHcqTS1ANGQJ5JXfA1wZY9VTVRjaIPfNFLhDxIcGK+JZ+6wXKQTRptAqRcD4s KceKIF6jWxBonFwFoGQQx95xidlT6OdKAfjzP2bk2B2NlVZItCERSF7W79hiSUrKu5JU kBPUpNvZ0UHFWarCx0dprvaD6aLsSnI/sTEdbXYlZVieI7cjIkzT7sAXIYDBPGVJpn5M 39K0Pw3t2Ue9iUCKzT5i3HBxxuM0BiijfqFJ5PrJ3atOuvkiWdvCOKZ/tbvcT2m1q/y3 guvImmIV7QvD6fYY9FePdrvMz3T0lMuW2HOrxw1noHPzudif76XjtO8yIalgY3ya/tQe vqFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=c4bSNv5uEB3rptMTdP7NkyHI6exwcg+ZS6ABcP2TV1s=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=B0EjK/9DAl5f6edRUuwOtG1YckVj2SF8e5tleq4crqdkDkfahcsLXy4+Tw2wHsz+lU Y+mDw+Xtn77sW3Fxz4d1Cyxlu5Hl2QhYdHArYKUZMEv47ritHFJqFpYhovmXHJ3s88Kj yzQ+7/au5MEqFLo5X+r1mP7m4dLy0u1Wf/DyxxVr9N3ynQM4jOjj6RMxudM+OwkSEhic TBjGVJgZf5EQeGqLnsE7YVw/UC4sGc0KX216RSI5XpYmnv5KbyH1dYLdAmqvkzBvdqu6 WOvFhNtChoSkCUdD65T15SMuozFQb4dTg+FKlqe8fyqiArSB19A7hmqgLZMoV5Bn4rjf bTxw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=Hylixo+Z; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f8c12e6si1309636e87.244.2024.09.08.18.24.08; Sun, 08 Sep 2024 18:24:09 -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=@gmail.com header.s=20230601 header.b=Hylixo+Z; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2DE9768DD14; Mon, 9 Sep 2024 03:55:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 60A0F68DBBD for ; Mon, 9 Sep 2024 03:55:25 +0300 (EEST) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-374c1120a32so2167697f8f.1 for ; Sun, 08 Sep 2024 17:55:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843325; x=1726448125; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=+gTrODdLBL/onxDnx/GBcnRbSW+pbjddjcdHXyTfh6o=; b=Hylixo+ZsSnWpY1EjigWfR8zyZq2OLLGmKbfeB+xHBtj7R13ojrx6ZRmQoXJi6mg13 zTw38D07Vc11u2cBxwrkhkBnP7DPCuNVV2FIIHk5dqe0q80zEfqIX7RJyb36+bHd2zcg qDULQk57dV3EdPvmrfwZiQjD5CjfB/7Iblen581zUd8vsc7BR2N8k3cj6KPfdPq9B24T M2DTOTbCnQNDUoK6xsEP+hjkZm5DgM8dJ7oKTXXA6hMFFEXNWlwWyOGIgEkpTBvBcFkP M2RaFXAMWQsv+uLbrgrxrJPqPzwIJLZrggmSikpyet+1XQDyQOoAkx7LhQ+aEiFuAeDE lDJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843325; x=1726448125; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+gTrODdLBL/onxDnx/GBcnRbSW+pbjddjcdHXyTfh6o=; b=pFHmMm98qnxhKYE/FlyCBx0A9pqn3WK6VN9YOk6JfV2fYlKtbroyyFCshif58nDXqF a8fsBO+KKdMhBHJ8AC9js5csJd4Gj+SwBzpMtOIOIyo0IIXeHCrpgOCDEpeY4aHVraq5 mjywya6FOV3Az0WDZqpQBoHVYuA4281z8eTVyN8ky/HSXTu6d011ZAbzWXWbDQGz0adg cDlTZMZiOcb8e6QS1ukFe1Qag6Cb52agKt/9TmgRtlY/1dy4IfDwc6twWHRJgzV772yy U6Bxboip6NWJxZbAeDxhbZDAJvwviPbAnVwNgUqDZAXkueqzonMQMCfWcOZRY1WiBhwj YZJw== X-Gm-Message-State: AOJu0Yzkly2ayWtG3UYZ4xDKR8UyOB9JoFwhSuj1TJxvj3YAn8TOFtmg HgtjBFwWs9aEsHDw9JicTGhRXIRNRAcSeC70s+yg2Ava5VB9rjz6gXjyFA== X-Received: by 2002:a5d:42c2:0:b0:374:ba2c:3028 with SMTP id ffacd0b85a97d-37889682e7fmr6342712f8f.36.1725843324543; Sun, 08 Sep 2024 17:55:24 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:24 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 23:03:35 +0200 Subject: [FFmpeg-devel] [PATCH 25/60] avcodec/mjpegdec: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: N4wiVoEK0lwf --- libavcodec/mjpegdec.c | 15 +++++++-------- libavcodec/mjpegenc_common.c | 13 ++++++------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 7daec649bc..86ec58713c 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -2377,7 +2377,7 @@ int ff_mjpeg_decode_frame_from_buf(AVCodecContext *avctx, AVFrame *frame, int hshift, vshift; int unescaped_buf_size; int start_code; - int i, index; + int index; int ret = 0; int is16bit; AVDictionaryEntry *e = NULL; @@ -2657,7 +2657,7 @@ the_end: if (s->upscale_v[p] == 1) h = (h+1)>>1; av_assert0(w > 0); - for (i = 0; i < h; i++) { + for (int i = 0; i < h; i++) { if (s->upscale_h[p] == 1) { if (is16bit) ((uint16_t*)line)[w - 1] = ((uint16_t*)line)[(w - 1) / 2]; else line[w - 1] = line[(w - 1) / 2]; @@ -2735,7 +2735,7 @@ the_end: h = AV_CEIL_RSHIFT(h, vshift); } dst = &((uint8_t *)s->picture_ptr->data[p])[(h - 1) * s->linesize[p]]; - for (i = h - 1; i; i--) { + for (int i = h - 1; i; i--) { uint8_t *src1 = &((uint8_t *)s->picture_ptr->data[p])[i * s->upscale_v[p] / (s->upscale_v[p] + 1) * s->linesize[p]]; uint8_t *src2 = &((uint8_t *)s->picture_ptr->data[p])[(i + 1) * s->upscale_v[p] / (s->upscale_v[p] + 1) * s->linesize[p]]; if (s->upscale_v[p] != 2 && (src1 == src2 || i == h - 1)) { @@ -2777,7 +2777,7 @@ the_end: int w = s->picture_ptr->width; int h = s->picture_ptr->height; av_assert0(s->nb_components == 4); - for (i=0; ipicture_ptr->width; int h = s->picture_ptr->height; av_assert0(s->nb_components == 4); - for (i=0; iiccnum; i++) + for (int i = 0; i < s->iccnum; i++) total_size += s->iccentries[i].length; ret = ff_frame_new_side_data(avctx, frame, AV_FRAME_DATA_ICC_PROFILE, total_size, &sd); @@ -2847,7 +2846,7 @@ the_end: if (sd) { /* Reassemble the parts, which are now in-order. */ - for (i = 0; i < s->iccnum; i++) { + for (int i = 0; i < s->iccnum; i++) { memcpy(sd->data + offset, s->iccentries[i].data, s->iccentries[i].length); offset += s->iccentries[i].length; } diff --git a/libavcodec/mjpegenc_common.c b/libavcodec/mjpegenc_common.c index 049ae3d929..751e43fd3b 100644 --- a/libavcodec/mjpegenc_common.c +++ b/libavcodec/mjpegenc_common.c @@ -39,18 +39,17 @@ static int put_huffman_table(PutBitContext *p, int table_class, int table_id, const uint8_t *bits_table, const uint8_t *value_table) { - int n, i; + int n = 0; put_bits(p, 4, table_class); put_bits(p, 4, table_id); - n = 0; - for(i=1;i<=16;i++) { + for (int i = 1; i <= 16; i++) { n += bits_table[i]; put_bits(p, 8, bits_table[i]); } - for(i=0;i 1) { put_bits(p, 4, 0); /* 8 bit precision */ put_bits(p, 4, 1); /* table 1 */ - for(i=0;i<64;i++) { - j = intra_matrix_permutation[i]; + for (int i = 0; i < 64; i++) { + uint8_t j = intra_matrix_permutation[i]; put_bits(p, 8, chroma_intra_matrix[j]); } } From patchwork Sun Sep 8 21:25:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51477 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1595294vqu; Mon, 9 Sep 2024 05:14:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVQaatMKG4wVRHbv2lwwZT7xJR/LH/jJ3ryzHRei1b69kTwM0040cbpkz71IeRX2LqnR0xSuaibtByzqkefePQj@gmail.com X-Google-Smtp-Source: AGHT+IGRjp8mEZqsdqgPM1+0k4D1/8/dMfpjs+2slmBxDTC+kyjzNs5kWy0InPZlJxvY2nNk1e5F X-Received: by 2002:a17:907:da3:b0:a79:a1b2:1a5e with SMTP id a640c23a62f3a-a8a88909224mr391803166b.10.1725884049715; Mon, 09 Sep 2024 05:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725884049; cv=none; d=google.com; s=arc-20240605; b=SwY2tZ8Sy10ODnPfsn910lssn/Jl7y5F7kaWPs4AyN4VyepulI395istWcrMaAxU8B W9Y99jDufQItZpyFgpekGd0sjFrCBNH353bAPfGwIrXJidZak2jjodIbht22ZOHl8VQ2 EkmMrvS76JdzmVmu7nJLkkIInlYzFtD07E6+hDB+I3qYKCEW5eUtnQz4QcYDkoxfhUDz hhClCz7urEVz4eucWFCw3dvDwqPs3buL8b1vxnfJ6QjEMXJk9xDyw5kdfBafzxfRTeqP rAqeD+mybvs8R1oelpleMeBLt/Kb1iCj1yPtMUw+U3SOfpy+YMf4iRsA1vfEeNZl9AHx +csg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=kImdJGMw9xhO6fEtCdDsdGZ+xlex1+Urm4kZTseBPJY=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=idO6DrTHGCqi7IOHHoglqh3IsdyAXbUKJ9MpEHRPLAGIwpS6M1TmtozxSluDE3nTqF OhZDEreHpzOuq2ePT/YdcFTGjGGiZ0O9CTwI3Xi/pyZ3I7J1CvX5nK3BIvodxv9qPCD3 O51ZTL7YV7ZRIrVHIgVSj8zT0YB59Us2g7kWN3FHkM0S+AKyO+1tYFGKn8eMGB6X2Bi2 JaicidpLUhsHmTfP3nP9jSBmnrwhWBDs/AjLtma2kWGMiCNozmBX1nqLAPFT3TMng6F3 7orzkcQvLEPpyjwVqhU0UnPBNrPHP08tmjbl/RMwg3SFZrhn6pZjWX6/EYEIb7Xt9P6I 2Xhw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=Wulk0gTn; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25c515e6si344191366b.340.2024.09.09.05.14.09; Mon, 09 Sep 2024 05:14:09 -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=@gmail.com header.s=20230601 header.b=Wulk0gTn; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3960868DD29; Mon, 9 Sep 2024 03:55:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 13F2E68DB24 for ; Mon, 9 Sep 2024 03:55:26 +0300 (EEST) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-42cb9a0c300so659285e9.0 for ; Sun, 08 Sep 2024 17:55:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843325; x=1726448125; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=nuAbcLtI9oTTzh4Ttr6h/J/D9Wtcom1IcjRMTeR6pdI=; b=Wulk0gTnbHX3vsFbtVRil9v/V2Vydndvu45CR+/a87Q1Fjf/htfmmrCkz9hHfFMkE5 PsxQupbVnW9bSrCTisgps1JsndYzZrYsxVuRZg1ckS32UNI/5nY/ZjK0UlCkPOpbc5hq TPH1rQYg+RH5zBllCugDb4qmlh4pWfdtwuV4T+wtTM5wfs10q/H9EzNTZdUd8H8CEdwJ k1W93wUPspAiWhXy9NrlBGNsqrbgY2A5UmDYcFkKohboR5EB+ryxrrZVZh7Xl8YPpv82 9eaJnoRUCBNbma/gelnOydeVF3+J9OLTsSfMzP6uc8mZhuyChuVa//C/f3Y9mWlnQLgT WGaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843325; x=1726448125; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=nuAbcLtI9oTTzh4Ttr6h/J/D9Wtcom1IcjRMTeR6pdI=; b=d1btGuy/TgrEWPy107A6lrKl3ArBP4Mv9rxcLhyNR0Df9Gn9lRijG06/If6bL1+S/o KomxtUyamrq/XJ/V1nkbzF7A5gRiKK7B/0Ks1sqbiEJlAQZGCkdWwk12Sap/SvaUeXF6 S58VeBZjGf9mVQENILRWQVFabzEKHLLlF6NsLsxRBuItB6ZV6xvLD2vsEYwATzlJ5eA3 EE/rzs9JsfhZRVahivVx7Yt307z3wyAumdZfcO3LhCZDp+7kJ34UJ8uX9RkzBZo+vRHJ 6oCHk/Xt8DCn7XlB7U0PjJFF/EEEeq1ng41luE/l150btAUmYljsutj44AWJSCPJ/o71 CoZQ== X-Gm-Message-State: AOJu0YzwWUCl87d12WdSC9Et1AO/UF9S6bxEZruriyqrT94KvXLPRAiz fiGLKnN32Yr8jH/wAQNLJxTgZIt+wjQTZaxtRn4gxTyPNfvVJjvPpJApZA== X-Received: by 2002:a05:600c:4707:b0:426:5dd0:a1ee with SMTP id 5b1f17b1804b1-42c9f97bc2amr68372245e9.2.1725843325387; Sun, 08 Sep 2024 17:55:25 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:24 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 23:25:51 +0200 Subject: [FFmpeg-devel] [PATCH 26/60] avcodec/g2meet: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 1eJGJDVv8XtW --- libavcodec/g2meet.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c index 7ae987ec40..f952a06f12 100644 --- a/libavcodec/g2meet.c +++ b/libavcodec/g2meet.c @@ -1052,7 +1052,6 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, { int width, height; int hdr, zsize, npal, tidx = -1, ret; - int i, j; const uint8_t *src_end = src + src_size; uint8_t pal[768], transp[3]; uLongf dlen = (c->tile_width + 1) * c->tile_height; @@ -1071,11 +1070,10 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, hdr = *src++; sub_type = hdr >> 5; if (sub_type == 0) { - int j; memcpy(transp, src, 3); src += 3; - for (j = 0; j < height; j++, dst += c->framebuf_stride) - for (i = 0; i < width; i++) + for (int j = 0; j < height; j++, dst += c->framebuf_stride) + for (int i = 0; i < width; i++) memcpy(dst + i * 3, transp, 3); return 0; } else if (sub_type == 1) { @@ -1093,7 +1091,7 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, memcpy(pal, src, npal * 3); src += npal * 3; if (sub_type != 2) { - for (i = 0; i < npal; i++) { + for (int i = 0; i < npal; i++) { if (!memcmp(pal + i * 3, transp, 3)) { tidx = i; break; @@ -1125,8 +1123,8 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, bstride = FFALIGN(width, 16) >> 3; // blocks are coded LSB and we need normal bitreader for JPEG data bits = 0; - for (i = 0; i < (FFALIGN(height, 16) >> 4); i++) { - for (j = 0; j < (FFALIGN(width, 16) >> 4); j++) { + for (int i = 0; i < (FFALIGN(height, 16) >> 4); i++) { + for (int j = 0; j < (FFALIGN(width, 16) >> 4); j++) { if (!bits) { if (src >= src_end) return AVERROR_INVALIDDATA; From patchwork Sun Sep 8 21:32:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51427 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1387996vqu; Sun, 8 Sep 2024 19:54:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX2LWcHkV6hCavuprDWBL7m9j/wBCTmb8lTWhPcJqPTiVtSo8O8DmxxQRa1IaLh4UViYF9D4fpLsVwZ8hSwSswf@gmail.com X-Google-Smtp-Source: AGHT+IGy71odn2R4GdqENNE22KQKjYdBimmNUazQdX4xIvbXABgoqG43fq13JsaS75W5CjKnoZex X-Received: by 2002:a17:906:c14f:b0:a8d:481a:563a with SMTP id a640c23a62f3a-a8d481a570bmr359667566b.25.1725850452115; Sun, 08 Sep 2024 19:54:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725850452; cv=none; d=google.com; s=arc-20240605; b=jfJVKFXpNpTRcLU0ZOijwkWntwYzzJWy4S7OakDMvUBBaj81fcAtyqN1yh8KK6g+lv lSYhyGSmfmmmUZgO+OvrGDqb798K1ZR7mbpkr3SwD/76UIVEYVgTaHTtqZC09ZR4xajg x/ddwX/B6Yt0W9HsRZq0pT5x1APaU2FAAy93kgWU2otbxNdevBXEvTDa5UOXFxlqkaLd T5mLQbp/U9akNiUjcoSEiGo2B6vCTn990/9wXdxschH/ugnWfXu1IJfIYf6kiA4NMCeh A0JHhaENQ3ytoXVtLVnSrswtlwPPVhTvSnoAcxWX+6iOSQAijubcOKmQrmWcxQ2cRWsY tTJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=Ycw6Oc8/RLA0NM+kPNyrMR43CRo6wQ7in7b+qO+wg4g=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=RK/jz+20phrSyLSQ2DE+V2awwAjnHlGBS+b6JuBwAtIYKSpkseex2oPtCU5ptibg0q X8ev3zBOeG8VjHSUElVeBz66hgbwFNGtjv7wEtN+LyBbwz7zJA47DaoRumrrBMwN65jh ArwLpNVfG0/H4xQLGBkEukmCKLswXLZKTDmkgYJjpjhPfOhlHqoeISoYD1lomjjtPtNG Sc8HDAVcKNP4kPcocaXDX1rIrfx9dGbTluorZikUCGpi27erlkb1tfGeKt/nab/TZ7Ov rmredjkSlYjSv4uC3QjMvp4eB8KfdLWhCfGaWBHqXk5dIrB0/xIchH2SYPWSgGXFG3fq BMnQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=gYarmR34; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5c3ebd855absi3033731a12.314.2024.09.08.19.54.11; Sun, 08 Sep 2024 19:54:12 -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=@gmail.com header.s=20230601 header.b=gYarmR34; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 37D7C68DD42; Mon, 9 Sep 2024 03:55:45 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 59B3368DC45 for ; Mon, 9 Sep 2024 03:55:28 +0300 (EEST) Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-374c5bab490so2945030f8f.1 for ; Sun, 08 Sep 2024 17:55:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843327; x=1726448127; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=6eiuGMo7+jvt/fCnMm7xhvLmYRtLMbnfgkTk6DBqaMY=; b=gYarmR34bImmzt8Ikk6UP+dXH5gF0PWRFVAySo8LSm0PoEfwdaZdlH8r5Ou/3MdwwJ z6bFp698ysHsKLcNCxaz8Mqyj13pCZcHmOdOOZKS1WOsoTM3M+E5miasY94uw0RfESPh GdXcYSvdp9CM39liBUmi7ztY9Zs0TO5ea7yDdpX8c/SQp/UGgxke/FWga/aqt3sG9rY4 t3MvdxXk/kSq6mPRPV0ssy3S6j+DVZ+9II17HTUadbk+YA+B/wai7EI5suRxczYNsp6P 5KbNf4Kta0oD49U773fJbMY+WxytRzfdDL6IgyCRRdmiTqVZH/PNSW2ckZgjXA9ePS9S ZbDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843327; x=1726448127; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=6eiuGMo7+jvt/fCnMm7xhvLmYRtLMbnfgkTk6DBqaMY=; b=SGVOj1gAuKugB9Yrc0be/MFHclRefMfnmKmQ3RpoInF1h4PDZdziaZI7E7zBWn7FLF 8VgHMBxpZPyvqnXFvmptc7XuUeTzlyHp5IVpSfRPj9cXU4rE6YUHcf2BbXcWDwAreRuW 1nwc1xaeKdivyXilFkgI/9BP8oL9u9qVENulv+iryk2K27yA/2KDWaGsZ//9KdmgM11x gb+BABePkMiVZC1OOlszmnfbawQ4A0yko1ywASITtz/kM2CZQEmDxvXB+XOgdFwEXomr YosfyN0tMA0X46XqQxZVxAZU1EiWeFNNuUJ2bxMjl/6WmbQ3u86cfPShLaznLo8+/Tgl 6raA== X-Gm-Message-State: AOJu0Yyd3BEKfUc/kiWv+uIAKzRv58K++Dlvm429+28i43/vFfCWKa8q NETTFSRQtk1sCxpF7r5JU4ZPQaPeESits0XUhYd6WwTTroKqparwJl7TgA== X-Received: by 2002:adf:f147:0:b0:374:c692:42e2 with SMTP id ffacd0b85a97d-37799f5e933mr9962220f8f.9.1725843327536; Sun, 08 Sep 2024 17:55:27 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:26 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 23:32:59 +0200 Subject: [FFmpeg-devel] [PATCH 28/60] avcodec/fix: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: CBSJHsFuLiwd --- libavcodec/fic.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/fic.c b/libavcodec/fic.c index ec26e3154d..4763fab689 100644 --- a/libavcodec/fic.c +++ b/libavcodec/fic.c @@ -191,8 +191,6 @@ static int fic_decode_slice(AVCodecContext *avctx, void *tdata) for (y = 0; y < (slice_h >> !!p); y += 8) { for (x = 0; x < (ctx->aligned_width >> !!p); x += 8) { - int ret; - if ((ret = fic_decode_block(ctx, &gb, dst + x, stride, tctx->block, &tctx->p_frame)) != 0) return ret; From patchwork Sun Sep 8 21:38:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51422 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1376103vqu; Sun, 8 Sep 2024 19:04:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVYIezneZVo7t/Vfg6hHPlFtI05z35c5klbot/vBhhy62xCMJ0HueLJQamyXATfygbQM+x1dIKvLAOyqeJFHK/3@gmail.com X-Google-Smtp-Source: AGHT+IEjY5Ril09kMmzbBBIyptxfyk33kjA9UlOcQSFNiEs9xoY/VcpsR81NJZRfSNtx+flaBGHE X-Received: by 2002:a05:6402:5207:b0:5c2:4e5b:d0cc with SMTP id 4fb4d7f45d1cf-5c3dc77ff69mr2764304a12.1.1725847448624; Sun, 08 Sep 2024 19:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725847448; cv=none; d=google.com; s=arc-20240605; b=caXXHBsFWP2d5rGPFj7Dru0IsMMy1Kg7t2f6hqqhMCDhaeY2si003xC3eQUVq0JUDH q2SFng7UIRXNJGw9KXpMFLzOsxYDn56GC1QX8eW5Lcitq2cZmrUV6sXLIxUvT18f38XS 0ltyz4FJ5zFXwlFfAufYSnKwObZPwhHGZmK3ek3ErLY0fg39axlLPETIMCgCjBDgrHwU ZpaHGt3Zo4BLQSq2dv3fdk2SDSDzWG1NNrdOeLzeCMpn9wdaSBFhpBFfXhvvRVvUO7wA YK4Zrje9PnbOom3pkgYw3dmgGbwqmkdV98WFROAU1Dy+I2AR2eul+Ijb6OujLJAtmObU 6Opw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=DsTeeLv52MCysYmpLOHCHnr1UAn2BuBGkTDt6hqIP9k=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=UmYWaNyLNZ+2CvdcJaKAR5iVo0i9DanFuusF9iuoSJ5BPzOy2OhbFDFvH9L5UJCNHF 5UQCCkOmJYeUMk1c0hbRojdg5sSZSlHGnANryeSd1WxzFyJxuM8aDq9SLT+dxNe+kbc8 wTY0UpV7INTYydxItLPN6ofsJ4fJxFmqwrYralR5JeaOYD0o9CK1hBTFsIIqeupPFi8U 2qc0yjXwc7dIHHTJL6BRJ+lXzJQyk9ux8rLcNlxhE5nKOm/kGjxmaS7LsWwTLxEQhdsl acT8+LaA68ij0ncYyGdHywhghMZYZyqPP/ul2xeGKJQVUylEPITCg4IpIzvOpYDRfkGh 5y4w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=CRJW24e6; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5c3ebdaa5d8si3100200a12.550.2024.09.08.19.04.08; Sun, 08 Sep 2024 19:04: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=@gmail.com header.s=20230601 header.b=CRJW24e6; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 65E4168DD37; Mon, 9 Sep 2024 03:55:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 46B4368DC45 for ; Mon, 9 Sep 2024 03:55:29 +0300 (EEST) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-42cae102702so15072205e9.0 for ; Sun, 08 Sep 2024 17:55:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843328; x=1726448128; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=4K6kA5C58SWi2iBywTcfEDhNj7t2CA1kQBeHDhtZ34g=; b=CRJW24e66mm9OZ8ZEJIozTyk/AX/mDZ/DLYOyb+I8xjLZdKc0qKHZ1xYOMYME/KXGG cAWEUYRzucF5dA373JLg7qkA4TY6qkYzQKXWPB166VbmuDdf4H6nNQPc38XOHrcuUta5 hnxg99peDgoxP6ohycjbc1Yu9xBKWHXVmL8jgh61fEhfBRETo3/k0MRsO7JKOqtomGm6 l5TmQbcI5YSYe6Uix9rNoq5HPhQ2ts6Sbe4+IIs44VwEaf7TlsDA9AR6sOv1EIv0NyFk ped8UDPGOc/za48sIkRmsmScsCfgmSDsJH2+YRDNO3ebiuxiIyD+62qvjBFfTFuB0wsa ugOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843328; x=1726448128; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=4K6kA5C58SWi2iBywTcfEDhNj7t2CA1kQBeHDhtZ34g=; b=kxh4uUaNDT/W9dlhGVffcktk5HQndEFxwIGaIioNtFxCYAQsd/gX1xAH3I7wY0aP82 +VaIu0qVbW8R0BgJ08NnfLcDUUBiNaNDW6IH7BE72n++/t8i258xNxRtXOXd8/aEd/+i k8ntcZxCcpFciyP8KmJZ+sykh7KDlFPsCW14jBaANAQ6tPkYTB5lS4bQJKGQNLkXVj6y PNMOjA/xo6bUcZSkOPLtC50acvFIPHKKZmSOjX1+zKaKzzHQCK/gROGhy9jPF5dcIYnQ FZTem3y+yOCh1UNGXmnykVchznE8oB4X75nwgnfZdSs9+din6d/Xrxz72I7HSoqDV8V4 Xexg== X-Gm-Message-State: AOJu0YzOl5KefT2zAMb6HumNw5krR2QEqkXP8w6xCZXVvELA7YuPa9bk 7OI0zLobuY9t9/lQhBqYuNK8kEgxbnHrKzIPJ35w93MZdGtx+O4eagkaSw== X-Received: by 2002:adf:f147:0:b0:374:c35a:7335 with SMTP id ffacd0b85a97d-378949f7ccbmr3379314f8f.18.1725843328493; Sun, 08 Sep 2024 17:55:28 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:27 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 23:38:26 +0200 Subject: [FFmpeg-devel] [PATCH 29/60] avcodec/fix: narrow variable scopes 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 8NpV8N2D5Ul6 --- libavcodec/fic.c | 44 ++++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/libavcodec/fic.c b/libavcodec/fic.c index 4763fab689..8f4277b4e1 100644 --- a/libavcodec/fic.c +++ b/libavcodec/fic.c @@ -113,25 +113,24 @@ static av_always_inline void fic_idct(int16_t *blk, int step, int shift, int rnd static void fic_idct_put(uint8_t *dst, int stride, int16_t *block) { - int i, j; int16_t *ptr; ptr = block; fic_idct(ptr++, 8, 13, (1 << 12) + (1 << 17)); - for (i = 1; i < 8; i++) { + for (int i = 1; i < 8; i++) { fic_idct(ptr, 8, 13, 1 << 12); ptr++; } ptr = block; - for (i = 0; i < 8; i++) { + for (int i = 0; i < 8; i++) { fic_idct(ptr, 1, 20, 0); ptr += 8; } ptr = block; - for (j = 0; j < 8; j++) { - for (i = 0; i < 8; i++) + for (int j = 0; j < 8; j++) { + for (int i = 0; i < 8; i++) dst[i] = av_clip_uint8(ptr[i]); dst += stride; ptr += 8; @@ -140,7 +139,7 @@ static void fic_idct_put(uint8_t *dst, int stride, int16_t *block) static int fic_decode_block(FICContext *ctx, GetBitContext *gb, uint8_t *dst, int stride, int16_t *block, int *is_p) { - int i, num_coeff; + int num_coeff; if (get_bits_left(gb) < 8) return AVERROR_INVALIDDATA; @@ -157,7 +156,7 @@ static int fic_decode_block(FICContext *ctx, GetBitContext *gb, if (num_coeff > 64) return AVERROR_INVALIDDATA; - for (i = 0; i < num_coeff; i++) { + for (int i = 0; i < num_coeff; i++) { int v = get_se_golomb(gb); if (v < -2048 || v > 2048) return AVERROR_INVALIDDATA; @@ -179,18 +178,18 @@ static int fic_decode_slice(AVCodecContext *avctx, void *tdata) int slice_h = tctx->slice_h; int src_size = tctx->src_size; int y_off = tctx->y_off; - int x, y, p, ret; + int ret; ret = init_get_bits8(&gb, src, src_size); if (ret < 0) return ret; - for (p = 0; p < 3; p++) { + for (int p = 0; p < 3; p++) { int stride = ctx->frame->linesize[p]; uint8_t* dst = ctx->frame->data[p] + (y_off >> !!p) * stride; - for (y = 0; y < (slice_h >> !!p); y += 8) { - for (x = 0; x < (ctx->aligned_width >> !!p); x += 8) { + for (int y = 0; y < (slice_h >> !!p); y += 8) { + for (int x = 0; x < (ctx->aligned_width >> !!p); x += 8) { if ((ret = fic_decode_block(ctx, &gb, dst + x, stride, tctx->block, &tctx->p_frame)) != 0) return ret; @@ -206,9 +205,7 @@ static int fic_decode_slice(AVCodecContext *avctx, void *tdata) static av_always_inline void fic_alpha_blend(uint8_t *dst, uint8_t *src, int size, uint8_t *alpha) { - int i; - - for (i = 0; i < size; i++) + for (int i = 0; i < size; i++) dst[i] += ((src[i] - dst[i]) * alpha[i]) >> 8; } @@ -219,10 +216,9 @@ static void fic_draw_cursor(AVCodecContext *avctx, int cur_x, int cur_y) uint8_t *dstptr[3]; uint8_t planes[4][1024]; uint8_t chroma[3][256]; - int i, j, p; /* Convert to YUVA444. */ - for (i = 0; i < 1024; i++) { + for (int i = 0; i < 1024; i++) { planes[0][i] = (( 25 * ptr[0] + 129 * ptr[1] + 66 * ptr[2]) / 255) + 16; planes[1][i] = ((-38 * ptr[0] + 112 * ptr[1] + -74 * ptr[2]) / 255) + 128; planes[2][i] = ((-18 * ptr[0] + 112 * ptr[1] + -94 * ptr[2]) / 255) + 128; @@ -232,22 +228,22 @@ static void fic_draw_cursor(AVCodecContext *avctx, int cur_x, int cur_y) } /* Subsample chroma. */ - for (i = 0; i < 32; i += 2) - for (j = 0; j < 32; j += 2) - for (p = 0; p < 3; p++) + for (int i = 0; i < 32; i += 2) + for (int j = 0; j < 32; j += 2) + for (int p = 0; p < 3; p++) chroma[p][16 * (i / 2) + j / 2] = (planes[p + 1][32 * i + j ] + planes[p + 1][32 * i + j + 1] + planes[p + 1][32 * (i + 1) + j ] + planes[p + 1][32 * (i + 1) + j + 1]) / 4; /* Seek to x/y pos of cursor. */ - for (i = 0; i < 3; i++) + for (int i = 0; i < 3; i++) dstptr[i] = ctx->final_frame->data[i] + (ctx->final_frame->linesize[i] * (cur_y >> !!i)) + (cur_x >> !!i) + !!i; /* Copy. */ - for (i = 0; i < FFMIN(32, avctx->height - cur_y) - 1; i += 2) { + for (int i = 0; i < FFMIN(32, avctx->height - cur_y) - 1; i += 2) { int lsize = FFMIN(32, avctx->width - cur_x); int csize = lsize / 2; @@ -272,7 +268,7 @@ static int fic_decode_frame(AVCodecContext *avctx, AVFrame *rframe, FICContext *ctx = avctx->priv_data; const uint8_t *src = avpkt->data; int ret; - int slice, nslices; + int nslices; int msize; int tsize; int cur_x, cur_y; @@ -371,7 +367,7 @@ static int fic_decode_frame(AVCodecContext *avctx, AVFrame *rframe, } memset(ctx->slice_data, 0, nslices * sizeof(ctx->slice_data[0])); - for (slice = 0; slice < nslices; slice++) { + for (int slice = 0; slice < nslices; slice++) { unsigned slice_off = AV_RB32(src + tsize + FIC_HEADER_SIZE + slice * 4); unsigned slice_size; int y_off = ctx->slice_h * slice; @@ -407,7 +403,7 @@ static int fic_decode_frame(AVCodecContext *avctx, AVFrame *rframe, ctx->frame->flags |= AV_FRAME_FLAG_KEY; ctx->frame->pict_type = AV_PICTURE_TYPE_I; - for (slice = 0; slice < nslices; slice++) { + for (int slice = 0; slice < nslices; slice++) { if (ctx->slice_data[slice].p_frame) { ctx->frame->flags &= ~AV_FRAME_FLAG_KEY; ctx->frame->pict_type = AV_PICTURE_TYPE_P; From patchwork Sun Sep 8 21:55:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51456 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1441676vqu; Sun, 8 Sep 2024 23:24:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWzzPSCcUOSb5s/thDf+wRTZGFpLYrhN5kgFfpoF90mTqieuUgEXTZPT+8BPm/+VZxjGrfwFbNsYJn46jv9Wbw3@gmail.com X-Google-Smtp-Source: AGHT+IFkqTgrAR18mug8cW+q//PN62VlFMUN934/7mXSUpwV+DS4WHGnPZ9I4xly5pkP17/cLIUk X-Received: by 2002:a05:6512:39ce:b0:52c:88d7:ae31 with SMTP id 2adb3069b0e04-5365880a657mr6608923e87.48.1725863055839; Sun, 08 Sep 2024 23:24:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725863055; cv=none; d=google.com; s=arc-20240605; b=LEnFpOc9BGrFEtO8c+jnOO7+LPwapbK1/Yz1ZB0GBXgdNdS/ARGWbJQD1PBm7Ho/dS hpLyY3gPDAOVCJ5XquwfE1z5zyyVzg3LdYn2s7q/YAlRRWGOCBCyxYyxKvMqTCHuXUc5 IJmNVqwYvbm71Pc3DgP4GEWT0lpDsGIurhpa9GkKF4+SA119DNGLPZBGINO4Lz3Rd91F 1WAQ105vpjsaP6G0wN+79zpQMYbob87CSmMsawU8QFkhuYr/zRbVyfGvzCQ/cT+CtwuZ C5yu/e5a0TieAQQ++CGA/ePZQM0QWPrZ33zvqO1lyfrqWSbJ02F+DBmqNeBV4rzYNDpJ vz2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=OVLocuNDM8/YSOJWDneoj5M2rmfTSaakz+zWhnX1XmI=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=gqdMBDEZexZF8AyMhqufMiA2OMgfZonV7o8xD51K2yXX2AJQ+1xcaAPERFKRe3gGoD hAQo8KU6zTX9cjxJx4PQoJGlmVQhPbT/KI7GcFXuROXVEgD2yaTk+nSmfNenKA/ZglBD ohPlEyX7SoZEA/V96eA+DRl3Fzvd/uccd3pUg7IZ18y1MaMi2A62VSNXjGiiEIHmV27l VXxfhfjtQdmoEs6Q65fXCHDW8xbjksls7BcY9yKx/dU6NCjTf7SoZvObXQW79GaY6HLW gqL2ygBoGnB6VFER03ZiV2ohbuDI2cCT4EzrkYpDH7ep0cmxrwHTTIthNvOZGeFT8nq6 SR5w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=QXH2KhVQ; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25ce96cesi345602966b.510.2024.09.08.23.24.15; Sun, 08 Sep 2024 23:24:15 -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=@gmail.com header.s=20230601 header.b=QXH2KhVQ; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A417468DD66; Mon, 9 Sep 2024 03:55:47 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5407068DC59 for ; Mon, 9 Sep 2024 03:55:30 +0300 (EEST) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-42cae6bb895so14488935e9.1 for ; Sun, 08 Sep 2024 17:55:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843329; x=1726448129; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=ZKOlJiY67zDk/q+NJQ6XvlT+4mw0x0qfcFQMeLERZYU=; b=QXH2KhVQi+/BOkRQKhWL/Nrfj0U6AUDIoN47GtIa8QBGzXIawYISuFqSo3ov8aG9dF uNQOSoONDchVBKE6qlK/T5Ij1KR3K+9rMD8V0eIPeH4kFCghYv9RfJu+DY1zKmTGnQ67 P7gNAxzxi3XPeoxR0kjYJ2T21p+V6qVjCUnRL13qDfxjPNRnOIx9AV1UXUZ5+c+bcLzZ rCiI4XBot1AIR4/7SYlMrAawjs7OWjniBPs5aWSLZP8gJBij4wIKgIn9cB2dQzIhzPnc tELNX+dU0skIYavU7yLIpyyzec36iJYxAowJcCe/4jEnGlj7U2Z+GKoZvwY1fcHPxbqo NPZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843329; x=1726448129; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ZKOlJiY67zDk/q+NJQ6XvlT+4mw0x0qfcFQMeLERZYU=; b=ZioyFghxJb/pXHtVW7g+f8BA6wR7JkdSiov3GGpaX90qbPxNQf20TvDKLXhdXEj3hD sKdLsSg33OC3RNeK07FH/LS0GSXrY4IL7+Gicvm0r5AKSaaG0ipMEvtbGWOC5BVQcYEb IglSGdRWzsP8SSlCUkI5/VCl8Kdcz6Hpq0ceW5XkTf8Nwzzj4lalmnmEJUcFPh43O8V8 Raxj9RfStDzAh0Wa3rAONchp7nrCkwCr8GxO3PpbzSAeRVLuUze/zrvakgNK+9IndiDh GgR9oatfMk8I3DQIZzfjZDWq62EyuSMSwu+4eNAxt0IVJIUyxd0bM5EMxBDSEZujaqxz pb6A== X-Gm-Message-State: AOJu0YxanX6iUWIxRqNnupp8zIYwv6mkBwKAkhkQ3Y8nbTanmTY5Bbhk YuUnLugCsbjW1u8Fkz+gMBWXNL3T1lzYgMmu3+QZ8ayt0PZCo3FVzraDwg== X-Received: by 2002:a05:600c:1d16:b0:428:c0a:27ea with SMTP id 5b1f17b1804b1-42c9f9799a6mr55852675e9.12.1725843329547; Sun, 08 Sep 2024 17:55:29 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:28 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Sun, 8 Sep 2024 23:55:16 +0200 Subject: [FFmpeg-devel] [PATCH 30/60] avcodec/ffv1enc: fix shadowing and narrow variable scopes 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: lCOzqhS5D7mY --- libavcodec/ffv1enc.c | 113 +++++++++++++++++----------------- libavcodec/ffv1enc_template.c | 19 +++--- 2 files changed, 63 insertions(+), 69 deletions(-) diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index 23d757e5c6..f054ef0974 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -517,7 +517,7 @@ static av_cold int encode_init(AVCodecContext *avctx) { FFV1Context *s = avctx->priv_data; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); - int i, j, k, m, ret; + int ret; if ((ret = ff_ffv1_common_init(avctx)) < 0) return ret; @@ -704,16 +704,16 @@ static av_cold int encode_init(AVCodecContext *avctx) } if (s->ac == AC_RANGE_CUSTOM_TAB) { - for (i = 1; i < 256; i++) + for (int i = 1; i < 256; i++) s->state_transition[i] = ver2_state[i]; } else { RangeCoder c; ff_build_rac_states(&c, 0.05 * (1LL << 32), 256 - 8); - for (i = 1; i < 256; i++) + for (int i = 1; i < 256; i++) s->state_transition[i] = c.one_state[i]; } - for (i = 0; i < 256; i++) { + for (int i = 0; i < 256; i++) { s->quant_table_count = 2; if (s->bits_per_raw_sample <= 8) { s->quant_tables[0][0][i]= quant11[i]; @@ -753,7 +753,7 @@ static av_cold int encode_init(AVCodecContext *avctx) s->picture_number = 0; if (avctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) { - for (i = 0; i < s->quant_table_count; i++) { + for (int i = 0; i < s->quant_table_count; i++) { s->rc_stat2[i] = av_mallocz(s->context_count[i] * sizeof(*s->rc_stat2[i])); if (!s->rc_stat2[i]) @@ -761,7 +761,7 @@ static av_cold int encode_init(AVCodecContext *avctx) } } if (avctx->stats_in) { - char *p = avctx->stats_in; + char *stats = avctx->stats_in; uint8_t (*best_state)[256] = av_malloc_array(256, 256); int gob_count = 0; char *next; @@ -771,42 +771,42 @@ static av_cold int encode_init(AVCodecContext *avctx) av_assert0(s->version >= 2); for (;;) { - for (j = 0; j < 256; j++) - for (i = 0; i < 2; i++) { - s->rc_stat[j][i] = strtol(p, &next, 0); - if (next == p) { + for (int j = 0; j < 256; j++) + for (int i = 0; i < 2; i++) { + s->rc_stat[j][i] = strtol(stats, &next, 0); + if (next == stats) { av_log(avctx, AV_LOG_ERROR, - "2Pass file invalid at %d %d [%s]\n", j, i, p); + "2Pass file invalid at %d %d [%s]\n", j, i, stats); av_freep(&best_state); return AVERROR_INVALIDDATA; } - p = next; + stats = next; } - for (i = 0; i < s->quant_table_count; i++) - for (j = 0; j < s->context_count[i]; j++) { - for (k = 0; k < 32; k++) - for (m = 0; m < 2; m++) { - s->rc_stat2[i][j][k][m] = strtol(p, &next, 0); - if (next == p) { + for (int i = 0; i < s->quant_table_count; i++) + for (int j = 0; j < s->context_count[i]; j++) { + for (int k = 0; k < 32; k++) + for (int m = 0; m < 2; m++) { + s->rc_stat2[i][j][k][m] = strtol(stats, &next, 0); + if (next == stats) { av_log(avctx, AV_LOG_ERROR, "2Pass file invalid at %d %d %d %d [%s]\n", - i, j, k, m, p); + i, j, k, m, stats); av_freep(&best_state); return AVERROR_INVALIDDATA; } - p = next; + stats = next; } } - gob_count = strtol(p, &next, 0); - if (next == p || gob_count <= 0) { + gob_count = strtol(stats, &next, 0); + if (next == stats || gob_count <= 0) { av_log(avctx, AV_LOG_ERROR, "2Pass file invalid\n"); av_freep(&best_state); return AVERROR_INVALIDDATA; } - p = next; - while (*p == '\n' || *p == ' ') - p++; - if (p[0] == 0) + stats = next; + while (*stats == '\n' || *stats == ' ') + stats++; + if (stats[0] == 0) break; } if (s->ac == AC_RANGE_CUSTOM_TAB) @@ -814,11 +814,11 @@ static av_cold int encode_init(AVCodecContext *avctx) find_best_state(best_state, s->state_transition); - for (i = 0; i < s->quant_table_count; i++) { - for (k = 0; k < 32; k++) { + for (int i = 0; i < s->quant_table_count; i++) { + for (int k = 0; k < 32; k++) { double a=0, b=0; int jp = 0; - for (j = 0; j < s->context_count[i]; j++) { + for (int j = 0; j < s->context_count[i]; j++) { double p = 128; if (s->rc_stat2[i][j][k][0] + s->rc_stat2[i][j][k][1] > 200 && j || a+b > 200) { if (a+b) @@ -878,10 +878,10 @@ slices_ok: for (int j = 0; j < s->slice_count; j++) { for (int i = 0; i < s->plane_count; i++) { - PlaneContext *const p = &s->slices[j].plane[i]; + PlaneContext *const plane = &s->slices[j].plane[i]; - p->quant_table_index = s->context_model; - p->context_count = s->context_count[p->quant_table_index]; + plane->quant_table_index = s->context_model; + plane->context_count = s->context_count[plane->quant_table_index]; } ff_build_rac_states(&s->slices[j].c, 0.05 * (1LL << 32), 256 - 8); @@ -895,8 +895,8 @@ slices_ok: avctx->stats_out = av_mallocz(STATS_OUT_SIZE); if (!avctx->stats_out) return AVERROR(ENOMEM); - for (i = 0; i < s->quant_table_count; i++) - for (j = 0; j < s->max_slice_count; j++) { + for (int i = 0; i < s->quant_table_count; i++) + for (int j = 0; j < s->max_slice_count; j++) { FFV1SliceContext *sc = &s->slices[j]; av_assert0(!sc->rc_stat2[i]); sc->rc_stat2[i] = av_mallocz(s->context_count[i] * @@ -913,14 +913,13 @@ static void encode_slice_header(FFV1Context *f, FFV1SliceContext *sc) { RangeCoder *c = &sc->c; uint8_t state[CONTEXT_SIZE]; - int j; memset(state, 128, sizeof(state)); put_symbol(c, state, (sc->slice_x +1)*f->num_h_slices / f->width , 0); put_symbol(c, state, (sc->slice_y +1)*f->num_v_slices / f->height , 0); put_symbol(c, state, (sc->slice_width +1)*f->num_h_slices / f->width -1, 0); put_symbol(c, state, (sc->slice_height+1)*f->num_v_slices / f->height-1, 0); - for (j=0; jplane_count; j++) { + for (int j = 0; j < f->plane_count; j++) { put_symbol(c, state, sc->plane[j].quant_table_index, 0); av_assert0(sc->plane[j].quant_table_index == f->context_model); } @@ -966,16 +965,16 @@ static void choose_rct_params(const FFV1Context *f, FFV1SliceContext *sc, }; int stat[NB_Y_COEFF] = {0}; - int x, y, i, p, best; + int best; int16_t *sample[3]; int lbd = f->bits_per_raw_sample <= 8; - for (y = 0; y < h; y++) { + for (int y = 0; y < h; y++) { int lastr=0, lastg=0, lastb=0; - for (p = 0; p < 3; p++) + for (int p = 0; p < 3; p++) sample[p] = sc->sample_buffer + p*w; - for (x = 0; x < w; x++) { + for (int x = 0; x < w; x++) { int b, g, r; int ab, ag, ar; if (lbd) { @@ -1000,7 +999,7 @@ static void choose_rct_params(const FFV1Context *f, FFV1SliceContext *sc, br -= bg; bb -= bg; - for (i = 0; i>2)); } @@ -1016,7 +1015,7 @@ static void choose_rct_params(const FFV1Context *f, FFV1SliceContext *sc, } best = 0; - for (i=1; islices[0].c; uint8_t keystate = 128; uint8_t *buf_p; - int i, ret; + int ret; int64_t maxsize = FF_INPUT_BUFFER_MIN_SIZE + avctx->width*avctx->height*37LL*4; if(!pict) { if (avctx->flags & AV_CODEC_FLAG_PASS1) { - int j, k, m; char *p = avctx->stats_out; char *end = p + STATS_OUT_SIZE; memset(f->rc_stat, 0, sizeof(f->rc_stat)); - for (i = 0; i < f->quant_table_count; i++) + for (int i = 0; i < f->quant_table_count; i++) memset(f->rc_stat2[i], 0, f->context_count[i] * sizeof(*f->rc_stat2[i])); av_assert0(f->slice_count == f->max_slice_count); - for (j = 0; j < f->slice_count; j++) { + for (int j = 0; j < f->slice_count; j++) { const FFV1SliceContext *sc = &f->slices[j]; - for (i = 0; i < 256; i++) { + for (int i = 0; i < 256; i++) { f->rc_stat[i][0] += sc->rc_stat[i][0]; f->rc_stat[i][1] += sc->rc_stat[i][1]; } - for (i = 0; i < f->quant_table_count; i++) { - for (k = 0; k < f->context_count[i]; k++) - for (m = 0; m < 32; m++) { + for (int i = 0; i < f->quant_table_count; i++) { + for (int k = 0; k < f->context_count[i]; k++) + for (int m = 0; m < 32; m++) { f->rc_stat2[i][k][m][0] += sc->rc_stat2[i][k][m][0]; f->rc_stat2[i][k][m][1] += sc->rc_stat2[i][k][m][1]; } } } - for (j = 0; j < 256; j++) { + for (int j = 0; j < 256; j++) { snprintf(p, end - p, "%" PRIu64 " %" PRIu64 " ", f->rc_stat[j][0], f->rc_stat[j][1]); p += strlen(p); } snprintf(p, end - p, "\n"); - for (i = 0; i < f->quant_table_count; i++) { - for (j = 0; j < f->context_count[i]; j++) - for (m = 0; m < 32; m++) { + for (int i = 0; i < f->quant_table_count; i++) { + for (int j = 0; j < f->context_count[i]; j++) + for (int m = 0; m < 32; m++) { snprintf(p, end - p, "%" PRIu64 " %" PRIu64 " ", f->rc_stat2[i][j][m][0], f->rc_stat2[i][j][m][1]); p += strlen(p); @@ -1185,14 +1183,13 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, } if (f->ac == AC_RANGE_CUSTOM_TAB) { - int i; - for (i = 1; i < 256; i++) { + for (int i = 1; i < 256; i++) { c->one_state[i] = f->state_transition[i]; c->zero_state[256 - i] = 256 - c->one_state[i]; } } - for (i = 0; i < f->slice_count; i++) { + for (int i = 0; i < f->slice_count; i++) { FFV1SliceContext *sc = &f->slices[i]; uint8_t *start = pkt->data + pkt->size * (int64_t)i / f->slice_count; int len = pkt->size / f->slice_count; @@ -1208,7 +1205,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, f->slice_count, sizeof(*f->slices)); buf_p = pkt->data; - for (i = 0; i < f->slice_count; i++) { + for (int i = 0; i < f->slice_count; i++) { FFV1SliceContext *sc = &f->slices[i]; int bytes; diff --git a/libavcodec/ffv1enc_template.c b/libavcodec/ffv1enc_template.c index bc14926ab9..af000c0b51 100644 --- a/libavcodec/ffv1enc_template.c +++ b/libavcodec/ffv1enc_template.c @@ -30,7 +30,6 @@ RENAME(encode_line)(FFV1Context *f, FFV1SliceContext *sc, { PlaneContext *const p = &sc->plane[plane_index]; RangeCoder *const c = &sc->c; - int x; int run_index = sc->run_index; int run_count = 0; int run_mode = 0; @@ -48,10 +47,9 @@ RENAME(encode_line)(FFV1Context *f, FFV1SliceContext *sc, } if (sc->slice_coding_mode == 1) { - for (x = 0; x < w; x++) { - int i; + for (int x = 0; x < w; x++) { int v = sample[0][x]; - for (i = bits-1; i>=0; i--) { + for (int i = bits-1; i>=0; i--) { uint8_t state = 128; put_rac(c, &state, (v>>i) & 1); } @@ -59,7 +57,7 @@ RENAME(encode_line)(FFV1Context *f, FFV1SliceContext *sc, return 0; } - for (x = 0; x < w; x++) { + for (int x = 0; x < w; x++) { int diff, context; context = RENAME(get_context)(f->quant_tables[p->quant_table_index], @@ -131,7 +129,6 @@ static int RENAME(encode_rgb_frame)(FFV1Context *f, FFV1SliceContext *sc, const uint8_t *src[4], int w, int h, const int stride[4]) { - int x, y, p, i; const int ring_size = f->context_model ? 3 : 2; TYPE *sample[4][3]; const int ac = f->ac; @@ -148,12 +145,12 @@ static int RENAME(encode_rgb_frame)(FFV1Context *f, FFV1SliceContext *sc, memset(RENAME(sc->sample_buffer), 0, ring_size * MAX_PLANES * (w + 6) * sizeof(*RENAME(sc->sample_buffer))); - for (y = 0; y < h; y++) { - for (i = 0; i < ring_size; i++) - for (p = 0; p < MAX_PLANES; p++) + for (int y = 0; y < h; y++) { + for (int i = 0; i < ring_size; i++) + for (int p = 0; p < MAX_PLANES; p++) sample[p][i]= RENAME(sc->sample_buffer) + p*ring_size*(w+6) + ((h+i-y)%ring_size)*(w+6) + 3; - for (x = 0; x < w; x++) { + for (int x = 0; x < w; x++) { int b, g, r, av_uninit(a); if (lbd) { unsigned v = *((const uint32_t*)(src[0] + x*4 + stride[0]*y)); @@ -193,7 +190,7 @@ static int RENAME(encode_rgb_frame)(FFV1Context *f, FFV1SliceContext *sc, sample[2][0][x] = r; sample[3][0][x] = a; } - for (p = 0; p < 3 + transparency; p++) { + for (int p = 0; p < 3 + transparency; p++) { int ret; sample[p][0][-1] = sample[p][1][0 ]; sample[p][1][ w] = sample[p][1][w-1]; From patchwork Sun Sep 8 22:24:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51464 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1464652vqu; Mon, 9 Sep 2024 00:34:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVZ7UJqL8rG/1OATkqSqVIn8Nd266+1WQROD1jgdNBqnMwHYrGSPiK68q8gZz+A1v2xzapVspXlWc/DmAS3xR7j@gmail.com X-Google-Smtp-Source: AGHT+IF2mfrgevqKVWkVwDE49DoU2+tBTCiAj7NRZb2/q21w0arawpZ8l/L/9hQUu1lipd0xtmdt X-Received: by 2002:a05:651c:150f:b0:2f7:59b8:7e9a with SMTP id 38308e7fff4ca-2f759b87f2amr21335561fa.9.1725867253661; Mon, 09 Sep 2024 00:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725867253; cv=none; d=google.com; s=arc-20240605; b=AR8ldZPFOhJbL7/Uvur4pwRWGdg+8lB+xRd8z6dIhDbmYMj/4+P7WUegpkby8d2m5S aS1uEv/EUtSc2OT0gsmj5KLs+Mu1HywABUSskUhy0VVeBUbFoIh9D23J9Lhi0fRsrlhC 5AeBOcZIcpRZvYD9U2orimy4CJFIY6nxKPm9MfYch6eSqaPikGv+eZpJ7RDjLQxD+sQq x3vyFT3AvwTP56L8fMyobzrVR7vOaSFIJo9fweStmCiZUXNft8ENo7lMeTxa3eL+YqYS 7ieEhhgjJAfUJnGlCnw4cI8x65JE94ow2d6OaNvfmAIBNC1Awox8KyOanycgxE+3pJ8k b4sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=AvtZULHnOxOshVD+eXNtvg7AvtlzLdL5jRno+DC6y1k=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=BFX65E03RWtGr0GTKzEh0Bjirvbm0odtCaS3dyb2p47T60Z2WlFO/MpKpujyQXiVc8 zDE/6rQ6ZzL8CLej17+XVCgkC0Fcv3tv7wnAyC/63+2vmWgOeOs6r7i2Ie1bNjPHpX8X Yqf3zPWd+crkSRiQpRiilZMqqkQMUGeN0qrqLBtNXNR/Zz9xA/gGFHCY3z5h7VTfoAPv YNxtQO18HybbTgyjqO5Bwo4HBMKj6KCY2Ak0bkGMvjcEftHGe67+S/Bmuoie4TwP0jg5 VMRhTKQEuIK2HY2qfPI/RJdsQiME3QWehmBV1zeSan4Gcgpe0OPmoVEPSUKOzkkn7Raj FdhQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=fdiaupXX; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 38308e7fff4ca-2f75c087638si14296381fa.429.2024.09.09.00.34.13; Mon, 09 Sep 2024 00:34:13 -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=@gmail.com header.s=20230601 header.b=fdiaupXX; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A5D7368DD4F; Mon, 9 Sep 2024 03:55:48 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3BC2F68DC68 for ; Mon, 9 Sep 2024 03:55:31 +0300 (EEST) Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-374c3400367so3115115f8f.2 for ; Sun, 08 Sep 2024 17:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843330; x=1726448130; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=RxehWZzxIfcZymGyfRv91zpTyt+rENq9vd9AJshIhfk=; b=fdiaupXX3Ujt7i8wkS4e/EEQigmF1YGFZec2B/LdCSnTMp/TppEaNnujj7+PhCbaio m/59denm02WsNhI1YC/Z6LnhKhNzHldbMtfn+tp9MdsJ5poX3ZbBIIOuGrzyCkV9S8bS eIzkedtNVfjno5qfiv/CtIuUH/0JjUlibat+GTIFnb5auhd+SWfN0Nu59w/wWziQgBuK 1YL98ya4WYxLSJ97ATR8RNmBJ5XGty8153rnMD+Pd4IiugVqiGhx/FmV3M3/Kq77YYuc CHweX12syJs3IosxGjxbtFTGLsQzgHkm7SsAgaKOQDMyosniLWz9SV0F4AY8ZXbH+pzr nzxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843330; x=1726448130; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=RxehWZzxIfcZymGyfRv91zpTyt+rENq9vd9AJshIhfk=; b=hgWqvnN21f70Z2HiPU5Zeqbod9HJn9Tn/Ko1nC4Jt4N87quuPjnXh5zsHv740sCRXk 8zwAK1in1S7RPFKIsAYsuYypRa5jVs1fT760WfBJL4iq890s5vh0zQQXsvFAgsj3tblV oWmcsmJzgaZOUFRBNHnTGPTf5znIKjr2UJme+KKhOULp7Ub5l3V0J4qpEZJ3OaC9a1Cs CNocqrwRFfd6MmJQtOfoMSlxje/CM6wdmNj+1DjS3WI3gCH50o0V5LdbhJlUJ/63jA1O 5HJPZu0RPgGviEX2qTclagiEDW+m8GWg+XpjbsCt7repuDf4TspuTMWRwA5pBqvM8DoG Qc4A== X-Gm-Message-State: AOJu0Yx/yzFWgXaECacpJpZ4J2KdmbPa/2BSE3t228WXXiJSbU2k2rMX NKJhxMgDa7f6oObAor6rt9w7zCHy0TiU22eJemRvogtYSP0u0kOjY6T2WQ== X-Received: by 2002:a5d:5cc5:0:b0:374:bcdc:6257 with SMTP id ffacd0b85a97d-37892466eecmr3963872f8f.54.1725843330546; Sun, 08 Sep 2024 17:55:30 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:30 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 00:24:34 +0200 Subject: [FFmpeg-devel] [PATCH 31/60] avcodec/exr: narrow variable scope and fix shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 8i5nGyVjEz8q --- libavcodec/exr.c | 103 ++++++++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 50 deletions(-) diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 4bac0be89b..0f7c7b8546 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -989,7 +989,7 @@ static int dwa_uncompress(const EXRContext *s, const uint8_t *src, int compresse int64_t ac_count, dc_count, ac_compression; const int dc_w = td->xsize >> 3; const int dc_h = td->ysize >> 3; - GetByteContext gb, agb; + GetByteContext gb; int skip, ret; if (compressed_size <= 88) @@ -1103,51 +1103,54 @@ static int dwa_uncompress(const EXRContext *s, const uint8_t *src, int compresse bytestream2_skip(&gb, rle_csize); } - bytestream2_init(&agb, td->ac_data, ac_count * 2); + { + GetByteContext agb; + bytestream2_init(&agb, td->ac_data, ac_count * 2); - for (int y = 0; y < td->ysize; y += 8) { - for (int x = 0; x < td->xsize; x += 8) { - memset(td->block, 0, sizeof(td->block)); + for (int y = 0; y < td->ysize; y += 8) { + for (int x = 0; x < td->xsize; x += 8) { + memset(td->block, 0, sizeof(td->block)); - for (int j = 0; j < 3; j++) { - float *block = td->block[j]; - const int idx = (x >> 3) + (y >> 3) * dc_w + dc_w * dc_h * j; - uint16_t *dc = (uint16_t *)td->dc_data; - union av_intfloat32 dc_val; + for (int j = 0; j < 3; j++) { + float *block = td->block[j]; + const int idx = (x >> 3) + (y >> 3) * dc_w + dc_w * dc_h * j; + uint16_t *dc = (uint16_t *)td->dc_data; + union av_intfloat32 dc_val; - dc_val.i = half2float(dc[idx], &s->h2f_tables); + dc_val.i = half2float(dc[idx], &s->h2f_tables); - block[0] = dc_val.f; - ac_uncompress(s, &agb, block); - dct_inverse(block); - } + block[0] = dc_val.f; + ac_uncompress(s, &agb, block); + dct_inverse(block); + } - { - const int o = s->nb_channels == 4; - float *bo = ((float *)td->uncompressed_data) + - y * td->xsize * s->nb_channels + td->xsize * (o + 0) + x; - float *go = ((float *)td->uncompressed_data) + - y * td->xsize * s->nb_channels + td->xsize * (o + 1) + x; - float *ro = ((float *)td->uncompressed_data) + - y * td->xsize * s->nb_channels + td->xsize * (o + 2) + x; - float *yb = td->block[0]; - float *ub = td->block[1]; - float *vb = td->block[2]; - - for (int yy = 0; yy < 8; yy++) { - for (int xx = 0; xx < 8; xx++) { - const int idx = xx + yy * 8; - - convert(yb[idx], ub[idx], vb[idx], &bo[xx], &go[xx], &ro[xx]); - - bo[xx] = to_linear(bo[xx], 1.f); - go[xx] = to_linear(go[xx], 1.f); - ro[xx] = to_linear(ro[xx], 1.f); - } + { + const int o = s->nb_channels == 4; + float *bo = ((float *)td->uncompressed_data) + + y * td->xsize * s->nb_channels + td->xsize * (o + 0) + x; + float *go = ((float *)td->uncompressed_data) + + y * td->xsize * s->nb_channels + td->xsize * (o + 1) + x; + float *ro = ((float *)td->uncompressed_data) + + y * td->xsize * s->nb_channels + td->xsize * (o + 2) + x; + float *yb = td->block[0]; + float *ub = td->block[1]; + float *vb = td->block[2]; + + for (int yy = 0; yy < 8; yy++) { + for (int xx = 0; xx < 8; xx++) { + const int idx = xx + yy * 8; + + convert(yb[idx], ub[idx], vb[idx], &bo[xx], &go[xx], &ro[xx]); + + bo[xx] = to_linear(bo[xx], 1.f); + go[xx] = to_linear(go[xx], 1.f); + ro[xx] = to_linear(ro[xx], 1.f); + } - bo += td->xsize * s->nb_channels; - go += td->xsize * s->nb_channels; - ro += td->xsize * s->nb_channels; + bo += td->xsize * s->nb_channels; + go += td->xsize * s->nb_channels; + ro += td->xsize * s->nb_channels; + } } } } @@ -1378,10 +1381,10 @@ static int decode_block(AVCodecContext *avctx, void *tdata, ptr = p->data[plane] + window_ymin * p->linesize[plane] + (window_xmin * 4); for (i = 0; i < ysize; i++, ptr += p->linesize[plane]) { - const uint8_t *src; + const uint8_t *tmp_src; union av_intfloat32 *ptr_x; - src = channel_buffer[c]; + tmp_src = channel_buffer[c]; ptr_x = (union av_intfloat32 *)ptr; // Zero out the start if xmin is not 0 @@ -1395,20 +1398,20 @@ static int decode_block(AVCodecContext *avctx, void *tdata, union av_intfloat32 t; if (trc_func && c < 3) { for (x = 0; x < xsize; x++) { - t.i = bytestream_get_le32(&src); + t.i = bytestream_get_le32(&tmp_src); t.f = trc_func(t.f); *ptr_x++ = t; } } else if (one_gamma != 1.f) { for (x = 0; x < xsize; x++) { - t.i = bytestream_get_le32(&src); + t.i = bytestream_get_le32(&tmp_src); if (t.f > 0.0f && c < 3) /* avoid negative values */ t.f = powf(t.f, one_gamma); *ptr_x++ = t; } } else { for (x = 0; x < xsize; x++) { - t.i = bytestream_get_le32(&src); + t.i = bytestream_get_le32(&tmp_src); *ptr_x++ = t; } } @@ -1416,11 +1419,11 @@ static int decode_block(AVCodecContext *avctx, void *tdata, // 16-bit if (c < 3 || !trc_func) { for (x = 0; x < xsize; x++) { - *ptr_x++ = s->gamma_table[bytestream_get_le16(&src)]; + *ptr_x++ = s->gamma_table[bytestream_get_le16(&tmp_src)]; } } else { for (x = 0; x < xsize; x++) { - ptr_x[0].i = half2float(bytestream_get_le16(&src), &s->h2f_tables); + ptr_x[0].i = half2float(bytestream_get_le16(&tmp_src), &s->h2f_tables); ptr_x++; } } @@ -2033,7 +2036,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, GetByteContext *gb = &s->gb; uint8_t *ptr; - int i, y, ret, ymax; + int y, ret, ymax; int planes; int out_line_size; int nb_blocks; /* nb scanline or nb tile */ @@ -2191,7 +2194,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, s->buf_size = avpkt->size; // Zero out the start if ymin is not 0 - for (i = 0; i < planes; i++) { + for (int i = 0; i < planes; i++) { ptr = picture->data[i]; for (y = 0; y < FFMIN(s->ymin, s->h); y++) { memset(ptr, 0, out_line_size); @@ -2206,7 +2209,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, ymax = FFMAX(0, s->ymax + 1); // Zero out the end if ymax+1 is not h if (ymax < avctx->height) - for (i = 0; i < planes; i++) { + for (int i = 0; i < planes; i++) { ptr = picture->data[i] + (ymax * picture->linesize[i]); for (y = ymax; y < avctx->height; y++) { memset(ptr, 0, out_line_size); From patchwork Sun Sep 8 22:33:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51458 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1447064vqu; Sun, 8 Sep 2024 23:44:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXLR9fvLWQrDP5t16uIPE+TVQi1dCUmP79k/fMUyUmJH41xrQMHsJeCVYP4iCO9fqa6rniJ4ZMjd97EM67iUTAH@gmail.com X-Google-Smtp-Source: AGHT+IHC12XMcmXoqCnZbHgzgf73WSuhizJbBQU1cFXwUnwrs4TEmAK0n4TPNl4bWLYwqufp6gIi X-Received: by 2002:a05:6512:b25:b0:535:4144:f9d3 with SMTP id 2adb3069b0e04-536588197c5mr2648305e87.11.1725864251141; Sun, 08 Sep 2024 23:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725864251; cv=none; d=google.com; s=arc-20240605; b=ErFzsqsQrNFsNjqJu23LVUT4AnnYTF0QGLVDxGnU2XymRPiGJxz0BCwViobJCYj1IE s9SujWwom8UeHldiNi1lglIEM7q9ZrOWN9R0Hziwue4/wxSZtF381/lgVcJvcpQjdPrC n0t2X2J7GsJkz0cVT9VB1vBwEFBq0xNZLF9JezRaGDCfnVk9LcsRwiQ+4b7X28i+tVry fzuYWewaR9Bl8/x9vHDp4MF5QvISre4BbIP9rbRCqN15wkBoDqiUGxCB3cnRoduNDTVK Ca0SPc/djJR5ceZoenXpuLQMILv87qZ9luVtCg2FgKzK03W4Y5ikiLvh7ydTCvifAx1w 41ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=SUcVGOp6G0YH+oL2T0HUsPeTZGMNjMfbk506EU6zFX4=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=h4B3qn2akA5YKOwJivGF/48TF1npv/aDLcuxmKzosWzE4SotV5eQqqquiwAM9PBaid 7Mhzt15Lx97MGJKWqA11rD3TxypBOoSC42Pzt9hjLz9fVxWqmAGOQ0dkxDLyk5U+iu1H 5Nx3pDgmqDWJf5VvsPd1u2hWgC7pELLjTwvZ4pYaJHM38ijD2X2foh4Zllb8UnXcT4xs PLArMxJunHg1cNXsMRHquXqu6AjwrCrSR9r8fvVVMFIBrW3hWB7omIeohYPRelyvXAfl w3U0g6RGnk3bem9GJB2y7/I/28Ln6+jpruXHPVhbfTc6TMTWCpUp5n17ic8jy+LD4EK/ nFug==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=kwDbrvHH; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f8c5e41si1361749e87.215.2024.09.08.23.44.10; Sun, 08 Sep 2024 23:44:11 -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=@gmail.com header.s=20230601 header.b=kwDbrvHH; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0E01168DD84; Mon, 9 Sep 2024 03:55:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 50A7D68DC65 for ; Mon, 9 Sep 2024 03:55:32 +0300 (EEST) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-42cb57f8b41so8007825e9.0 for ; Sun, 08 Sep 2024 17:55:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843331; x=1726448131; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=F4BVqM7sO43HZSZHlGn3fmiOfu4dXcZtdV0RN/+Yipg=; b=kwDbrvHHdgaEe7sH3w2uGBG1hE5y5wiAEQoFBdgnDx7HrVrl+Sxkzyra9U89xoBP1o K/bEYcvFAyGCY9NaAJ8TAxyJn15+vQIlPRuXc8x8Q1wGOPRafwdQTUYopXg020sdp5g4 MMGmKjFGiv6ss8y4VpQwBR+W/IH0uho9Rmk1mpU+vBcGl+y6kfh5n+CYmH3Yqk+K16fm hb0pxBDtYlTz01bAlXdThWZwL3voANpjA4M7RWpzASCekLRCe47w12CTA9lwBv/H+OCU BEU+EYyh7MHw3N/b0Defn9QF4y4gB/mb8WvJzaUx9aqNP1xtujjhOIlYu71iFp9O1Odm mgPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843331; x=1726448131; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=F4BVqM7sO43HZSZHlGn3fmiOfu4dXcZtdV0RN/+Yipg=; b=ruhuzUF9C/NGJjhgyfQFlU+sZynyrU96co/0FIxDrVHnajkCyKNmYzQMI9SH8fkQr2 +KC//nMw9hASA69yI7T7xUOB5MbkWD0SyWA2dHHHhyj3dEy3K/ISGDBn23Z+OdolWeVB 7RYMKVpbMx6JLBfllTAJQ3PtwfqP+5vNtCe2+3EMNcvJJ9FaZdkPnCFh31FDtb6FGu+P ES+y9WDD5WkTwUOiukb363GUj+Vp3HTEdY6n7CfAd2QJ+FO80v1GRA9GdN5UWHbFCuiY 4rsgSc9DReJsKQx2QJvTcQe4jrKA83Ww3XYmr/bcv4rBSUXu9lkphOEHNAoyuh7WZmyG zpHw== X-Gm-Message-State: AOJu0Yy70N1NQ6OG9rV9LGhsugHkBmC0ibkGPVBeipOGLXVzK9fVAaMK FogoRCpVbaASdwJ8aYcCciwbQSqZmfixdvNE5q8p7whAfCFMWzECF9Mucg== X-Received: by 2002:a05:600c:3c88:b0:426:59fe:ac27 with SMTP id 5b1f17b1804b1-42c9f9e087amr86864915e9.26.1725843331450; Sun, 08 Sep 2024 17:55:31 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.30 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:30 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 00:33:47 +0200 Subject: [FFmpeg-devel] [PATCH 32/60] avcodec/dvdec: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Wz3XmsK0lkbA --- libavcodec/dvdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c index 8297b6d2f3..7ca891e93a 100644 --- a/libavcodec/dvdec.c +++ b/libavcodec/dvdec.c @@ -155,10 +155,10 @@ static av_cold void dv_init_static(void) VLC dv_vlc = { .table = vlc_buf, .table_allocated = FF_ARRAY_ELEMS(vlc_buf) }; const unsigned offset = FF_ARRAY_ELEMS(dv_rl_vlc) - (2 * NB_DV_VLC - NB_DV_ZERO_LEVEL_ENTRIES); RL_VLC_ELEM *tmp = dv_rl_vlc + offset; - int i, j; + int j = 0; /* it's faster to include sign bit in a generic VLC parsing scheme */ - for (i = 0, j = 0; i < NB_DV_VLC; i++, j++) { + for (int i = 0; i < NB_DV_VLC; i++, j++) { tmp[j].len = ff_dv_vlc_len[i]; tmp[j].run = ff_dv_vlc_run[i]; tmp[j].level = ff_dv_vlc_level[i]; From patchwork Sun Sep 8 22:35:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51462 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1464629vqu; Mon, 9 Sep 2024 00:34:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUFZk2JWkWKkPx9IBMEqbca9voatw/pkRFqcBQ+TTlczU2RrlyVvH8FEoSIhrSJ/BCEgz8CHRgXGaer2eOOi/uz@gmail.com X-Google-Smtp-Source: AGHT+IECRFc8qTd9m0SmQgvt7/sMotaXH9oPc+IfmsNIad5n7OlICf7o95Gyh0Lw6fAmOsHZelMx X-Received: by 2002:a05:6512:2313:b0:52e:9cc7:4461 with SMTP id 2adb3069b0e04-536587a67c1mr6977108e87.5.1725867249570; Mon, 09 Sep 2024 00:34:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725867249; cv=none; d=google.com; s=arc-20240605; b=YeU6VMRn385zJ/G2+JH4aonUp9bmgk3KIXLd1FV/fpS48bc80tbR963QHtsUPN7V5w yn9ndLarr82VtsIG6ZmzZpNWsecdkz1cZuXkYLszZPzH/grabJ3bN6q3M+K3NRwpr1nv 8pTwYDOCD5G4aqbOEAt2wwNUZ1M67bCBSYRUmyZ5gdg00YrQA/TeEf1voz22RNlY/3Ah XYS8x3sP2f/CuxjXdcbcqeWnj8Fh40j4sJ3lAAijSm14qyekSyxxRMskR6xDpnIof1NT Im7YyoXpJqvunD9KzjpJXgVprWo1rOpuZGcHmU9jISma/GmmiG2FNxBu/TVdaO91+bbj 0KNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=cHjCtjXIFRiKTRYi017syaF+G2akEQd5t8ZPgE7UhbU=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=DFA1RyKKo63Tg9WT7C4h/nO5nWfQVPWrbCjJGC8wah6XTE8C6OpzegliOxOQw4p38t Nw+zZvgSDTumflLqMF1JdTU78r+8yu/Udo+bc2DcmAhernb48WXul4qSG67lUwfUHZAI nCfWsP9S3cZKwaS1lhg55uUtlNx4OEjQcqeclN3Tu5E2bqEFkMlabT9AkbVlnvpp9Wpf m6ZVE98UoKiUCR9nKz8jmCtKqenJm3cFre2kJwRdSujksGTOuMbownYw9ywo9CI5/Wus euuRqXPHtzheq1Uu8+JfsvGRiBaLlwNGzGm9Kl7VdGzT8nA5QRIND7qcAL3J9Au6vQpQ MXdw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=PD3N5zpx; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f8c16e1si1443037e87.300.2024.09.09.00.34.09; Mon, 09 Sep 2024 00:34:09 -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=@gmail.com header.s=20230601 header.b=PD3N5zpx; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3372F68DD86; Mon, 9 Sep 2024 03:55:51 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F158668DC7D for ; Mon, 9 Sep 2024 03:55:32 +0300 (EEST) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-42cb1758e41so11467045e9.1 for ; Sun, 08 Sep 2024 17:55:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843332; x=1726448132; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=ABuKr7JoBXG+mvJ4WoR1WCQAbtjSx4YveStSh/yNj7Q=; b=PD3N5zpxoSNuRwFNktkvlAaijnm1VMGCPzhi/ffcGbL8lwZFCLk8Ng50TSKS/rRyrW 0+aOu9FjqjxqwBVNRMs7MbOl1GDbpw0vl2kFV/cAULqXwUBa+4Mo58+0OXyjiSKRNghT NpVOhX3Q512Q4cdiUgDlnTvjkSnsFalhjyf2wtRBYpJQC2jm5lOWNd+58d6XKcvK1ZrO xzuJs0o29hZ0Sua8ALz0bOq10lXM8rWSrBXI/UcS0xWqZQweURHc6hD0IEqi0lz1k1Wz xZ21l+NH9NGldTaivh0SsXt1Q9eTLd/KovCCJQpKjsU28AIXhlma7qoRSQhdZDFa+ltT SDRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843332; x=1726448132; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ABuKr7JoBXG+mvJ4WoR1WCQAbtjSx4YveStSh/yNj7Q=; b=diCq1DBKSBKeSl4xuTVi9HR4KD5h5mm3GGJ94sF/BDeLhbAJgoiISwja8325x89AY2 1fAK9+DXZf6LgY7Pti6zzEGKX3hFwySqL7zmtZLHxk34s9QB4eEdK4GHR0Fl32OfLk0k 27TLB13hjDO2EyGwpjCuJwuxnHwFX6i9sad/4jDjwqqKZpU/LJdDmQQDYtfG6rTOEh/P sg6HCxdpLE2o4H5yJnNNFSGGQ9Q6sGXZEiqmQ+4Ig6pw8ylwk1equzSl+bAUuHyLVFln lhFJT4135LQ8MbFuNDW7q+9Cj+x4FvUXYLcz3aocfjFPDnPx3DI2FNkDgdy+sy9oZtJA +HPQ== X-Gm-Message-State: AOJu0Yz7jqSUX9G+X/JodPM/h6SJuP8umYjyRRjbiIEa8mHdOc2sXZIy 3Nb1DKZFJ4WsklxzKdK1fnaPjVahL3gHJVFpuYEpsi9RB3Gyv1UXkE6rpg== X-Received: by 2002:a05:600c:3ba3:b0:426:6f27:379a with SMTP id 5b1f17b1804b1-42cae70efccmr37085075e9.13.1725843332346; Sun, 08 Sep 2024 17:55:32 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:31 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 00:35:24 +0200 Subject: [FFmpeg-devel] [PATCH 33/60] avcodec/dv_tablegen: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Fk91hEKvrZn4 --- libavcodec/dv_tablegen.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/dv_tablegen.h b/libavcodec/dv_tablegen.h index 7f0ab53fa7..6d3e200a01 100644 --- a/libavcodec/dv_tablegen.h +++ b/libavcodec/dv_tablegen.h @@ -51,7 +51,7 @@ static struct dv_vlc_pair dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE]; static av_cold void dv_vlc_map_tableinit(void) { uint32_t code = 0; - int i, j; + int j; for (int i = 0; i < NB_DV_VLC; i++) { uint32_t cur_code = code >> (32 - ff_dv_vlc_len[i]); code += 1U << (32 - ff_dv_vlc_len[i]); @@ -70,7 +70,7 @@ static av_cold void dv_vlc_map_tableinit(void) dv_vlc_map[ff_dv_vlc_run[i]][ff_dv_vlc_level[i]].size = ff_dv_vlc_len[i] + (!!ff_dv_vlc_level[i]); } - for (i = 0; i < DV_VLC_MAP_RUN_SIZE; i++) { + for (int i = 0; i < DV_VLC_MAP_RUN_SIZE; i++) { #if CONFIG_SMALL for (j = 1; j < DV_VLC_MAP_LEV_SIZE; j++) { if (dv_vlc_map[i][j].size == 0) { From patchwork Sun Sep 8 22:36:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51428 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1388030vqu; Sun, 8 Sep 2024 19:54:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXln2uWI4n46MA9hfJ46MxuQlFf/hx5xwGZsZxJOY5S2Cju1MDqlNZvYH3AIBw5004TTFQ3rVjSbWPG5nhw5+tJ@gmail.com X-Google-Smtp-Source: AGHT+IH3DVa6xfg8KyZPNhYCzZ7sa6rDr/h/v25mpDNAmlsoKEAyWo4ThwVlZwG/CYORcMlFkFLL X-Received: by 2002:a05:6512:b9d:b0:52f:76:c258 with SMTP id 2adb3069b0e04-5365880faefmr2964651e87.8.1725850456112; Sun, 08 Sep 2024 19:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725850456; cv=none; d=google.com; s=arc-20240605; b=Fq2Kr7mxcZb+6EIHnLUaNDzY/gS6KL/dbx1U4ZSpFvRdilvQ7HmKqqXoMRBpI7fCc9 gkMd6z2gNH05DYsoXI6XdCs+A6HFU9GnbsYjd/jJV+4oe1QTWtZaQNbdwhZsjc2l2puJ ij0SBe9Q/t9PLCj3XMs73J5AmymzKqCjJrbSsnDI2xDizLE1esKn1i0rw+6UZvIOt+d2 tQKE8OzEoKlf1HyyUvjWod5DW0him/HZlNzkCe5yu6zIDin3k4fVPPIPReT5m0xmrqkC /035MB/s7DAm7GBHSiXFKVItgdaXvm7STqI/qTtR5Y3X6HCAqsG5AivrQqeqaGkvV/Ip KAxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=BuiFuhJoE7DjFZx/6nkw0PduIqEctgJ2DbaWf6WrA3Y=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=Api2ZIR6EOyzEIeLVv6D+0Db3zW7SY/SiWOQrKzfH8wftUzhvfLqtHtWA+06Yj0wcB YE8jtvkOfkWw+TiNEXudGhB+hhOAZODhMhx/xeYw3BoyPfsCFz+DF+mA9gHeuvpD6msi YbJVIviBrKpopwTN/PPvul9bFrmDOphCeGHdR1nOMbLkCF6j+zwqhwpRhKlsdPf0t0Nt ZWUDQMW9oc9TZeNHBCX1cXzFYBN5Rl622730XH+HUKduM3DGjfpQ+ye/s6oS7laM4JhK YiluXtB5L2iF2/xPNdFSCfDjReemrrxgAGueRl55AZO5bOjFUMSn+9M38oCNLF8q3NfV R2Fw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b="LP/Buhz2"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f866286si1322276e87.29.2024.09.08.19.54.15; Sun, 08 Sep 2024 19:54:16 -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=@gmail.com header.s=20230601 header.b="LP/Buhz2"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3266968DD9C; Mon, 9 Sep 2024 03:55:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 07ED868DC90 for ; Mon, 9 Sep 2024 03:55:33 +0300 (EEST) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-374c180d123so2051572f8f.3 for ; Sun, 08 Sep 2024 17:55:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843333; x=1726448133; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=aAY8uVAZL/JCOpcj4/VJ6V3MCJQ25uwE8BYA5Y2hJo0=; b=LP/Buhz24JlLDSX+jEQA3Zmsz8ExSeIgYCVoLtclwNsiKd4CDcTpBamXmW61wQ5Sz/ Pk74OpYrSv1RM3zPXxYAF+fi7tUH6lBfaGfhKAd5WE+RDIr1/GSsJXgbwFSfsW9fTUDf n8M0XbexZ/FoPAEeMXL+//lV2gUG8ISyiqfZZeDuSz2vRsU+PYPErsTCifhcMizXq6cT RP9b+Ze5mqrGvcJC9Nxo+SgG2jB5S5ycTsCjUhW+KorDvwbVXyZoCJPzh//GUz13f3Oa sxbDZFATXsZIqLcXfyztEGVZlEyb34G1WawXEDyMDekwfE5sTpKBc6TJwPmq1HlpQekg 0cMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843333; x=1726448133; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=aAY8uVAZL/JCOpcj4/VJ6V3MCJQ25uwE8BYA5Y2hJo0=; b=SqagiASURQDyGP0HCOGb5ALOTFqgM+i6lnxl5YXlcJBZ3QpALRtVQIQ8iyLLKmbELw vaJpqm667b9GOmPr9fPFF27C6hCgiPXJ/NrdZwoG9WIdpcck2WDvQhGwnCjW3aBIf+3R 9MmLe2RpYSZKOPHeDQru479PALAAMYGyHg9TTBvnuLEKs6ypaXY5Mx+mTxhs5IfOR7f/ kwCAoBCHzwjJ9SI+iK8wXGzPyBLDJLse/HCukibRqjadNB01F6a4ktPbwj23SY0MFyol ejcueIcSbiMhyLytBa2Q6NanBF8Z8MDql4qXOjED1wcS69pPEjSbf/hb84VbBgxCM/A4 Fd8g== X-Gm-Message-State: AOJu0Yz9jYDCTrZ3oT2V42Xh/i+EVAx4RwXfcO6pWpj3mAYX+mSnb29e x7/i810ja7meWOX+MHMNravqFh+q3R1rhbINjoWTmPsFXevRzxucJ/D7+A== X-Received: by 2002:a05:6000:1286:b0:374:ba83:8d73 with SMTP id ffacd0b85a97d-378949ef80cmr2866043f8f.8.1725843333321; Sun, 08 Sep 2024 17:55:33 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:32 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 00:36:34 +0200 Subject: [FFmpeg-devel] [PATCH 34/60] avcodec/dv_tablegen: narrow variable scope 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: OVZeFUCs3heb --- libavcodec/dv_tablegen.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/dv_tablegen.h b/libavcodec/dv_tablegen.h index 6d3e200a01..ee604b1cfe 100644 --- a/libavcodec/dv_tablegen.h +++ b/libavcodec/dv_tablegen.h @@ -51,7 +51,6 @@ static struct dv_vlc_pair dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE]; static av_cold void dv_vlc_map_tableinit(void) { uint32_t code = 0; - int j; for (int i = 0; i < NB_DV_VLC; i++) { uint32_t cur_code = code >> (32 - ff_dv_vlc_len[i]); code += 1U << (32 - ff_dv_vlc_len[i]); @@ -72,7 +71,7 @@ static av_cold void dv_vlc_map_tableinit(void) } for (int i = 0; i < DV_VLC_MAP_RUN_SIZE; i++) { #if CONFIG_SMALL - for (j = 1; j < DV_VLC_MAP_LEV_SIZE; j++) { + for (int j = 1; j < DV_VLC_MAP_LEV_SIZE; j++) { if (dv_vlc_map[i][j].size == 0) { dv_vlc_map[i][j].vlc = dv_vlc_map[0][j].vlc | (dv_vlc_map[i - 1][0].vlc << @@ -82,7 +81,7 @@ static av_cold void dv_vlc_map_tableinit(void) } } #else - for (j = 1; j < DV_VLC_MAP_LEV_SIZE / 2; j++) { + for (int j = 1; j < DV_VLC_MAP_LEV_SIZE / 2; j++) { if (dv_vlc_map[i][j].size == 0) { dv_vlc_map[i][j].vlc = dv_vlc_map[0][j].vlc | (dv_vlc_map[i - 1][0].vlc << From patchwork Sun Sep 8 22:39:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51430 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1393860vqu; Sun, 8 Sep 2024 20:14:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWp3CqbbGWIL1RxFBx7Jmkl/ZWVzROTB1a5CDrpw0ruxvmBA/w4Y9PzgIe2ob50i9yZ8sHcDrGD+akWGZJ6z0pK@gmail.com X-Google-Smtp-Source: AGHT+IFuQK5jW1qso7kdv3Zesp1uqGPT3yh0f5WEeZnMbokWhZkNGb/wiTOrzoIUSFLLeQwGM3cd X-Received: by 2002:a05:6402:35c1:b0:5c2:4ad9:6d9f with SMTP id 4fb4d7f45d1cf-5c3e953355dmr5969141a12.1.1725851650894; Sun, 08 Sep 2024 20:14:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725851650; cv=none; d=google.com; s=arc-20240605; b=Ay8778A5HIw6nZke+pGtpeY/vuPaJpNYOxEmdW6LRzz3TILWZScWoVUW8HJtKADzZ+ vXR77PjkpHChX11EPwE3tHL0DdiMqfCBiaCaXcT7zrn72If3qP5h+ghadXn7wVA/tNRa 5fENkdqUtuIFS+LxK2W0lg7IbTHsDh5Kv8KNK+ck9w1+uah22R4SSIZjHNkGuNmiMIHl aScpb5RpulPKRaBqhm2X7Ifibr+QOgRnxdACBhHtPlZCwa0rjnqzNDFmsFuFrcq11liz OlsB9057ubcPm4NYMgoPZpopP9l6wti0sy+nt34/ZJrawb+fqYCPBQDD94PQQm+E6muM XYGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=eJv8XJw/JjiPrqx1+a+EYIm7DE/04zoI2Xkj16Ekrks=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=OCUzToutpykSORumyKbb0gWq1na3h/JP6ycNmykZ8jvTIhmfjlsEtIDnox4RaIHtUN CAg+6kVD1zfI8u0xfD7emnzPdF5MbPSAC/X267f3uyzcUziWgSA2x2xRtabeW9wTAocx 2fsN8m1btZM2MavABf0cl91X9OtOtKbQdBQiaM3bG/B7qYVjmp6ju0uPlzL9wV78rj4V nIGBYJMCcpsycIPBjI4MYCmtOKkSLT5Xah2m8JO6NTECIcYDQMo7QKAkNyAzZ5ffxM+I ZUV87x92M2D2tLyMOfKDpRytPIw4r9jPiNthoIxSrsQYxm9dvBmGr9rcKbDkzbVRxM5z fDXQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=b62E0fGV; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5c3ebd42aeesi3204287a12.139.2024.09.08.20.14.10; Sun, 08 Sep 2024 20:14: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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=b62E0fGV; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 63A9C68DDA9; Mon, 9 Sep 2024 03:55:53 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E64CF68DC7B for ; Mon, 9 Sep 2024 03:55:34 +0300 (EEST) Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-374cacf18b1so2194199f8f.2 for ; Sun, 08 Sep 2024 17:55:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843334; x=1726448134; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=7JQrH0axqUAJ7U2APlrsGPJG44BqfADvla3FvTtqJnE=; b=b62E0fGVReuKrXB1v+rtKjalLkWPFlf0XzmsqFma9wcAwqEqYqY+I+oDeVBLLWF78o ajT1EEVRo7/GKP8pHmIzuJl6IVdcQ10FvhL87hL62vCMko27MZkDDtFCKk3FRjIffWoI uhtkURvawFA5uCWYgDMzkLdCRA1bUdubihLRjuI6HXj2SUmN3LuGY/O3SnlSyK6cT079 HN+GXUnf3TGt5vz01Um+JBI/LWiuSP6rjyGW2WMUbu9XQXVcMtDdtL80KyXVq9MDkdTt 7ojeZy0ZT7T4reSdPPpnj4MHa5lMWBsonY6uEWBxJSUQ2n9RCXmoYEiw2GGENu8tl2go ma8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843334; x=1726448134; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7JQrH0axqUAJ7U2APlrsGPJG44BqfADvla3FvTtqJnE=; b=Pd/hvMW6c3+PmSVLVd2QL4jSmXieWqoxwMzhEjNVjFcWQdL0DiVtwmPbfKtU/29wzl nNcH2iivJPNmgA22ivege55ZlG9E/mxkVIUl0+yGXrV5C/tQdfyGfqDqatcRGlxPKQ9X moXYLXGm4cZC06fcrEma5Rmlg1qlGLjr/QH1Ss8ULMdRHO/rojr4tJlNYeZXj/4V8PEm 4nj5L4CLzGVv55Dc8xRILLVHHUJLinxnVZ69RFK/sH/ZeHi0/rMM8d9txcXifUt3h84j dCZtDv1WKBjVPxSiI8ZZmAb61R+WuP12wEI3XFpNm0aFUVysJT48WbwSFdihsSH9Fil/ oYFg== X-Gm-Message-State: AOJu0YxirTafi4suVS+jPtJmq8ZWN/soQ+RQjk+j5FQpStRh1DcSCml0 fsxTkuF62xm2vFHKyPEPPP9HDjdNVs38h8njMva8Sc8dX3W783niBI2uEw== X-Received: by 2002:a5d:514d:0:b0:374:c581:9f4f with SMTP id ffacd0b85a97d-37892727f2bmr2951558f8f.55.1725843334135; Sun, 08 Sep 2024 17:55:34 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.33 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:33 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 00:39:01 +0200 Subject: [FFmpeg-devel] [PATCH 35/60] avcodec/eatgq: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: uLTvv7TxY9MI --- libavcodec/eatgq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c index d326c05390..b760f29243 100644 --- a/libavcodec/eatgq.c +++ b/libavcodec/eatgq.c @@ -154,19 +154,19 @@ static void tgq_idct_put_mb_dconly(TgqContext *s, AVFrame *frame, static int tgq_decode_mb(TgqContext *s, GetByteContext *gbyte, AVFrame *frame, int mb_y, int mb_x) { - int mode; + int ret, mode; int i; int8_t dc[6]; mode = bytestream2_get_byte(gbyte); if (mode > 12) { GetBitContext gb; - int ret = init_get_bits8(&gb, gbyte->buffer, FFMIN(bytestream2_get_bytes_left(gbyte), mode)); + ret = init_get_bits8(&gb, gbyte->buffer, FFMIN(bytestream2_get_bytes_left(gbyte), mode)); if (ret < 0) return ret; for (i = 0; i < 6; i++) { - int ret = tgq_decode_block(s, s->block[i], &gb); + ret = tgq_decode_block(s, s->block[i], &gb); if (ret < 0) return ret; } From patchwork Sun Sep 8 22:42:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51431 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1393877vqu; Sun, 8 Sep 2024 20:14:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWqhzRKRGVNDeKwxkdxb47Mk9pjbHPehm7oFtwJUOtWd9vfhY6oIThslAQdc71izF5dPJnUHkk72O8VAeiluqjD@gmail.com X-Google-Smtp-Source: AGHT+IFzYZgVFQc6b0pXxvORxLTrkl+CTYeDjGt9bCljAuQ39bdTw5rX0dD8vpy1UGYpnkQIReD7 X-Received: by 2002:a17:907:3d8b:b0:a80:a193:a509 with SMTP id a640c23a62f3a-a8a885bdde7mr300846666b.2.1725851654532; Sun, 08 Sep 2024 20:14:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725851654; cv=none; d=google.com; s=arc-20240605; b=cckxW+8/UcK0ReAa+rEv9affMUJDRSPfmX1sCtfVvByvdCw8B/xwhBER/mIm5ftJtn 6q5Phq71s9JCs6NBJL55HhojzQJ3eR54RW8+7jnyMeFs5K+JCYX9BjgaxEcRu/aN+6V0 4NBwn+jN3OxDRipH5F9V4r9qp+hdG9OU2S1eOnYPcncSQWJtpptIGcrtb2zfP7omvNvT UHnGitQcXPaPUAZpj0y/BkCGdOt2HL1305b5rF9RoSc05CoLTo9C+aETrylrH/WycQS8 YGia63LhYGiNRdnLgagT9KQ4geS+JVICUy8NBBB/aesjg0ChlgAHCa/Kugx8PO3dvGwj LeGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=HRIfwdgYp7F2oDLFMVJ7JsoNVxq3DXvx0R/6HOajWrk=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=S9GD55oIZBP7EpyddFL8gWvo9dE3NGcc0lGODyK0jOeLENv6UlENfQXe4fHQIl5LgI o6PBFj1xlkYe4Fi/aTr4uNYDkqTCWMlu/Ou+KnT0A7JjIC6ysDte3YAs3DOvLFo0kR7y CNHlS9WMJkmDnzdI2CMOiCaXJDXxCLZPLfVMe6t8El0yrZfq5me50n2l23LfvRo+4ykm jr8rdk2ABW7xALlItB9AxGzL3o1DnPc9wCURe2dlwEr/3SCSGCNkVLgvQ8nkEkltC4TL zBkz9MV/hBHZkatryAHOEf+yE5PUIz5BJuTYQ+IdUO93AJ2RBCL5Xzdq+9wGJ2AGnV0P xHrg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=Fs+Q7gMk; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25cf60c3si296779066b.584.2024.09.08.20.14.14; Sun, 08 Sep 2024 20:14:14 -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=@gmail.com header.s=20230601 header.b=Fs+Q7gMk; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E493A68DDAD; Mon, 9 Sep 2024 03:55:54 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8DD0668DC9A for ; Mon, 9 Sep 2024 03:55:35 +0300 (EEST) Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-375e5c12042so2063031f8f.3 for ; Sun, 08 Sep 2024 17:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843335; x=1726448135; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=3qPLpWXpmJbVFb+qW3ctyvCxuEoow/VVn0fWn2VF8E4=; b=Fs+Q7gMkzHqQXqcQSqNFBOft5VGKjw9KUwHY63k45oNoILkmg87xd47BL5P3iKejkf R01WM4wOsjOSdY1kQ1K7fAyyc2xPeHySALm3SHFLv6Q13GrPVwlRmpwRNli45fD4ydO1 FCpnIA2oyJhVzsn/xnL2WLs7tTPcG60qc8Ry9i31rF//g/4jE5gEcwxnz6M4nXxPzVIX ZucqPsfF4mglxQS5OZAG5U5y+NVaUl3eUXr1FgW1PZp4fTtI3ab3lSkEqoGOlLMpDB2m KGEqcVZbaOI128fMghnNnKy/6cP+VheNlTerRa5royTV+W9jntRrHmNvnqIKwTI9hNDt +6aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843335; x=1726448135; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=3qPLpWXpmJbVFb+qW3ctyvCxuEoow/VVn0fWn2VF8E4=; b=CNWLQDWZd8R5ZqpxddF8G/ENQvzmvP5yzdWJaA283EuWYm7nf8P5ijXee891EV79K4 yJgpAy0gSsx2I2mGqWNGxJcyJ3tTOMJIRNk8ekqDFXFLePzZM0iGTmkj37h1W7RQge2L kskEXMuD8WuprWCScS+dTjmXMbCcRKj4KoLRpUsSNq0iQwiIAFjXm5euFf1UKuEVj5gJ MF/xZAr7EOZOJGAa746fFwXj42biSE3p2FvwxxuDjqOlteZTjXxiXxhzxTv/sPLXje2Z uKgiFKeFBrQAXWsGACA7bJCoqMNX8G91Ro04Kj25EDD9DOzOzfSGyg0/djMD5Hry4ZYc gzkQ== X-Gm-Message-State: AOJu0YySSQcYhwiYCiFCKkVCUxIJ5mGIhC9GR0244FI8ZTjmf9K0zDpt wvdhWuNz9qCZiHAJ9QhfZxqU+vEAvXPOwVS+OMFbaoqvJU/zmeJzT2OTPA== X-Received: by 2002:adf:e6ce:0:b0:374:c50e:377b with SMTP id ffacd0b85a97d-378896c81edmr6913520f8f.57.1725843334878; Sun, 08 Sep 2024 17:55:34 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:34 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 00:42:19 +0200 Subject: [FFmpeg-devel] [PATCH 36/60] avcodec/eatgq: narrow variable scopes 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 28Q6ek8mqTC6 --- libavcodec/eatgq.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c index b760f29243..f17802f5e8 100644 --- a/libavcodec/eatgq.c +++ b/libavcodec/eatgq.c @@ -59,9 +59,9 @@ static av_cold int tgq_decode_init(AVCodecContext *avctx) static int tgq_decode_block(TgqContext *s, int16_t block[64], GetBitContext *gb) { const uint8_t *scantable = ff_zigzag_direct; - int i, j, value; + int value; block[0] = get_sbits(gb, 8) * s->qtable[0]; - for (i = 1; i < 64;) { + for (int i = 1; i < 64;) { switch (show_bits(gb, 3)) { case 4: if (i >= 63) @@ -77,7 +77,7 @@ static int tgq_decode_block(TgqContext *s, int16_t block[64], GetBitContext *gb) value = get_bits(gb, 6); if (value > 64 - i) return AVERROR_INVALIDDATA; - for (j = 0; j < value; j++) + for (int j = 0; j < value; j++) block[scantable[i++]] = 0; break; case 6: @@ -129,8 +129,7 @@ static inline void tgq_dconly(TgqContext *s, unsigned char *dst, ptrdiff_t dst_stride, int dc) { int level = av_clip_uint8((dc*s->qtable[0] + 2056) >> 4); - int j; - for (j = 0; j < 8; j++) + for (int j = 0; j < 8; j++) memset(dst + j * dst_stride, level, 8); } @@ -155,7 +154,6 @@ static int tgq_decode_mb(TgqContext *s, GetByteContext *gbyte, AVFrame *frame, int mb_y, int mb_x) { int ret, mode; - int i; int8_t dc[6]; mode = bytestream2_get_byte(gbyte); @@ -165,7 +163,7 @@ static int tgq_decode_mb(TgqContext *s, GetByteContext *gbyte, if (ret < 0) return ret; - for (i = 0; i < 6; i++) { + for (int i = 0; i < 6; i++) { ret = tgq_decode_block(s, s->block[i], &gb); if (ret < 0) return ret; @@ -180,7 +178,7 @@ static int tgq_decode_mb(TgqContext *s, GetByteContext *gbyte, } else if (mode == 6) { bytestream2_get_buffer(gbyte, dc, 6); } else if (mode == 12) { - for (i = 0; i < 6; i++) { + for (int i = 0; i < 6; i++) { dc[i] = bytestream2_get_byte(gbyte); bytestream2_skip(gbyte, 1); } @@ -195,11 +193,10 @@ static int tgq_decode_mb(TgqContext *s, GetByteContext *gbyte, static void tgq_calculate_qtable(TgqContext *s, int quant) { - int i, j; const int a = (14 * (100 - quant)) / 100 + 1; const int b = (11 * (100 - quant)) / 100 + 4; - for (j = 0; j < 8; j++) - for (i = 0; i < 8; i++) + for (int j = 0; j < 8; j++) + for (int i = 0; i < 8; i++) s->qtable[j * 8 + i] = ((a * (j + i) / (7 + 7) + b) * ff_inv_aanscales[j * 8 + i]) >> (14 - 4); } @@ -211,7 +208,7 @@ static int tgq_decode_frame(AVCodecContext *avctx, AVFrame *frame, int buf_size = avpkt->size; TgqContext *s = avctx->priv_data; GetByteContext gbyte; - int x, y, ret; + int ret; int big_endian; if (buf_size < 16) { @@ -238,8 +235,8 @@ static int tgq_decode_frame(AVCodecContext *avctx, AVFrame *frame, if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; - for (y = 0; y < FFALIGN(avctx->height, 16) >> 4; y++) - for (x = 0; x < FFALIGN(avctx->width, 16) >> 4; x++) + for (int y = 0; y < FFALIGN(avctx->height, 16) >> 4; y++) + for (int x = 0; x < FFALIGN(avctx->width, 16) >> 4; x++) if (tgq_decode_mb(s, &gbyte, frame, y, x) < 0) return AVERROR_INVALIDDATA; From patchwork Sun Sep 8 22:44:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51444 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1422931vqu; Sun, 8 Sep 2024 22:14:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUSe39YJbNqM7EeB8fXp5XeGs8FzFyYeYEfLt+wDoSYwYkGx6SOLxEh4wusUkGr/2Tz8nYaO/NctJlsXGsl4Hz1@gmail.com X-Google-Smtp-Source: AGHT+IFVYFzETsvX/2WPJSjd5Tg762686iT4z69xwTv1Ii7Oqz73FK+Xo5Qj3hFaGlrUuDVlDlwG X-Received: by 2002:a2e:bc0a:0:b0:2ee:5ed4:792f with SMTP id 38308e7fff4ca-2f751eb32bcmr58396471fa.2.1725858857005; Sun, 08 Sep 2024 22:14:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725858856; cv=none; d=google.com; s=arc-20240605; b=L/Z9KcT8/SG9UZsxuCIu/l4w3sDcPi200d+iXMEWWPJF8xdZawyR/N3tH4WQhyXMUQ 1JzyPdK+lDkuiB2lMELiLNigit2WM9jzBptvxKYWgxXu9A58Fz/HgCo6s5YLxaaoB6s/ 09NZ9zoavgTua7A3FBnQvU2k4dCYRGR5sedTj+tjKqOHy+SRcks1GmOK0Pib9xDJ+sk0 4IvPzjWDS5zBkrPZzt10kGWswmnU6cT2PfM6YCsSuuUawLQZCniq3FDICIMxC5BVyVSI KQY6mtJd5WswBEc+AQX627AYB8gOA35ODiTN5bdA+kX6Abo5oMVpNsrqi0o5XngWWQpH 2LYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=l7pe3YGRQJsni6tQ1FMKDvA1hkJz0z366NepeehT2lY=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=fUruPXSBcDSK0o4RyRwxcb4CTT4vA9ftze0Cr/66K34UQmzGvqLHKD5VxhxMF1lamq Z+p+sgf2/HbvQZp8+PkQJ/PmO3GTcM6PFhVWr7aMZAy6Zk6H5sIrmFfFzNoLeu2A7dV0 3wVAC6VvseOH4m5vepGc41Y1wd1hQOwFdfnuVGgDSD7MBefiZqPR+fmXa284hA7lWvp8 W9bqVztXpe2zYN2zgOIyfaYrAagmMDriEzM+JL6XKJqjCw2LlpTCsUfTwAUVIak3qhdI hbYdmuTxGZhh/j+NJkKxaG0ABaV+xwPXgA23WXVWD36uBEszas5KLpzH280ekDYNggsc sQRQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=P1JDafVK; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5c3ebdb737dsi3199387a12.667.2024.09.08.22.14.16; Sun, 08 Sep 2024 22:14:16 -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=@gmail.com header.s=20230601 header.b=P1JDafVK; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 134A368DDAF; Mon, 9 Sep 2024 03:55:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6BF7968DC9C for ; Mon, 9 Sep 2024 03:55:36 +0300 (EEST) Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-371ba7e46easo2452560f8f.0 for ; Sun, 08 Sep 2024 17:55:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843335; x=1726448135; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=U/4ee7cZzll0ENhzPrhHSVCYBXy9kT0T2Bza1vr1z4M=; b=P1JDafVKbFxPMKpVirlqqgBHl71aqiHTCib7RjtmwgEdTn0hPnCmhHEtEABX4u0wYL 3dyCoiZQuR8xQpllUAdc1mPaAM+1DV6DBn8YdFMpHjLbYuHOe0SqIzvqUy8taA2Q8nBr fFmiKSQT96RMC0/hz+rbJgbuUwtOTgL1RiYjtlZnsjPvrOclpmH0dis8Kh09DUFHltcO gF+ljxTczyFf66YiloZYmyLE+iEL+4Tm0cUhs4QPnuzGSvGUEjAAHhDtTzx/kvuTP/V2 j1FpVIZTUjmoe0ePSaE9tuzOlIXIxuhnlgzMm+eaNAaVOC52dfbCDVgnesOqZ+KEZHou pwxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843335; x=1726448135; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=U/4ee7cZzll0ENhzPrhHSVCYBXy9kT0T2Bza1vr1z4M=; b=S7DEaiNP5SLX4nNLAGNdzWj/RizWfR2v4S+kCVIXcWnBJqneCXc9z+RZNtd5bJ/spX OMjXItIIHGYR1DR4gagdm1sOGJW57byqvbyVaVm0vgauoxTeCljJT9tGRM5EnU0SYBG/ hUNU2ixFOTP+iaUbzS+41gWHwsxGmEAjkzFs2JNKDnhQSfQsoSTPxNIIkOnxOWguEAGt TpQX0qxHtKASvp1GaGEfE0PnEja1YlSRxr2RgBZIwpexZDLnPLoV9GucPgrFrbvCJ6xy GNzh82dZp4lwbMnwhbXnt5gy57oVz3YhpXUbk4JECxcefULqXO8g1h1ojBX9jDda/o3A TSbg== X-Gm-Message-State: AOJu0Yy0f6Y2X/mKdxp8Sw34k74XxgFKMyis/4OAQCiysn9eX8CkU2Ik ejNS+oWOCnBVWD2It0cqLbWGbaiOPTBZtJd3T2CLeC4WGrGRaTBNmRV8mA== X-Received: by 2002:a5d:6184:0:b0:368:64e:a7dd with SMTP id ffacd0b85a97d-378896a5c88mr5927308f8f.53.1725843335660; Sun, 08 Sep 2024 17:55:35 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.35 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:35 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 00:44:25 +0200 Subject: [FFmpeg-devel] [PATCH 37/60] avcodec/elbg: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 6LMzGw8mFEgU --- libavcodec/elbg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/elbg.c b/libavcodec/elbg.c index 84043af4fd..22219f9a6f 100644 --- a/libavcodec/elbg.c +++ b/libavcodec/elbg.c @@ -158,7 +158,7 @@ static int simple_lbg(ELBGContext *elbg, int *points, cell *cells) { - int i, idx; + int i; int numpoints[2] = {0,0}; int *newcentroid[2] = { elbg->scratchbuf + 3*dim, @@ -172,7 +172,7 @@ static int simple_lbg(ELBGContext *elbg, newutility[1] = 0; for (tempcell = cells; tempcell; tempcell=tempcell->next) { - idx = distance_limited(centroid[0], points + tempcell->index*dim, dim, INT_MAX)>= + int idx = distance_limited(centroid[0], points + tempcell->index*dim, dim, INT_MAX)>= distance_limited(centroid[1], points + tempcell->index*dim, dim, INT_MAX); numpoints[idx]++; for (i=0; isize_part; - int i, j, steps = 0; + int j, steps = 0; int best_idx = 0; int last_error; @@ -384,7 +384,7 @@ static void do_elbg(ELBGContext *restrict elbg, int *points, int numpoints, /* This loop evaluate the actual Voronoi partition. It is the most costly part of the algorithm. */ - for (i=0; i < numpoints; i++) { + for (int i = 0; i < numpoints; i++) { int best_dist = distance_limited(elbg->points + i * elbg->dim, elbg->codebook + best_idx * elbg->dim, elbg->dim, INT_MAX); @@ -413,7 +413,7 @@ static void do_elbg(ELBGContext *restrict elbg, int *points, int numpoints, memset(elbg->codebook, 0, elbg->num_cb * elbg->dim * sizeof(*elbg->codebook)); - for (i=0; i < numpoints; i++) { + for (int i = 0; i < numpoints; i++) { size_part[elbg->nearest_cb[i]]++; for (j=0; j < elbg->dim; j++) elbg->codebook[elbg->nearest_cb[i]*elbg->dim + j] += From patchwork Sun Sep 8 22:49:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51443 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1422896vqu; Sun, 8 Sep 2024 22:14:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW6MAkvnWPJtAMerkFvgZ6Las/gEgd5F1tQU1tfQWPsuhNYhKhozOVdzdlhX1tGhYTHviiTUy4Itag+IY1xMTLX@gmail.com X-Google-Smtp-Source: AGHT+IHDzuIWaZZnHC6DsH7c6VZYMTqMnN1W1si4YQIhzV+xonHb5+2N/EeZJ4/HcMOyUde5gxe0 X-Received: by 2002:a17:906:c085:b0:a8a:9054:8396 with SMTP id a640c23a62f3a-a8a905486a3mr287744766b.7.1725858851460; Sun, 08 Sep 2024 22:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725858851; cv=none; d=google.com; s=arc-20240605; b=MhNQYITHbsuFDJ9Mt8f8e4BFs1CEpjhi0k57Tn8aBL3SrjGmUdZgftFXNEMjCEpaso K5SjxLGlSQQzkVrzy6Tjbob1PX2e1ug0mvkSvmq0vXxfv1v7hSBNWyP6JhkMgfwWCge/ 4mZ5OP3I5fXxCSvhU3mb9odTHBHtYZRaxi7oWhp4AtpdBGSPhkwbHnIcc/OXOaioYcBJ OEvOjPJqOdOCfFKz5/RprObonGKUyZqazA5t+t6PfzJ6dqr7XYkYVN19DdFKs0qlNZlb oCe6yhObV2AfqoBPC70Uf4nNkxikIavExyca9X8O6b7nYhd3F9cHo3+yc9O4HeJlpbgZ xEIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=0gWQl73n1FEg/ygIRu4fMzwczRg6juBks37RD1X9p5Q=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=M8MK9ozZGb3tBieOQF1J8mR0XiaWq/G/mVc6YYWfvspawchFsAzUvH4jEjqo+2CgJX YbPyaUi8JIIqseBwQYB5Ph8WvZi0bkI5WOjXWDq2k3ASOp778wwpHry+Z0GCj5XnyRBa +MqajBBK6hR/or4eSXfuHswanTRiAqAODGVj8rrjTHMHNwXm3vD7ltVBunEzEV6z8eCP yk+XZoj2OlRlGpZptGArmNEZuK1AglHCouQHBJTsgFIVcuFl3vlN8CMr3Sv5rrcwurzq g3TWRXawi5DtyWPDulcTnJGyTxkvjMFfD6ztXtiI4YMl+C2yH7rowymotPHLIaoupCzj ZhWA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=WuMjGiJ9; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25ce8799si321902266b.509.2024.09.08.22.14.11; Sun, 08 Sep 2024 22:14:11 -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=@gmail.com header.s=20230601 header.b=WuMjGiJ9; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3DF8568DDCB; Mon, 9 Sep 2024 03:55:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4C27D68DCC6 for ; Mon, 9 Sep 2024 03:55:37 +0300 (EEST) Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-374c7d14191so2587241f8f.0 for ; Sun, 08 Sep 2024 17:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843336; x=1726448136; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=P+BOrRZX+z2hSk8+9WDXjFN+ycwGfHwW0ETw9PwthSY=; b=WuMjGiJ9IDNuKq0ZM+o02yfyZ5jY7F+7pVhQ+DIIGyFoTw8Fh6Llnv1AuzjXTgX+Rv qcQlP2EKY71u8NFl5H1LSQY4JtqrH6ej408vT8pqkwldfPE4Nv1UIfntEmNT8rvsAbVT jlivlqISisnp5xiQgCOltFpt2TMgpNc+mOk8RJEOH4QDjO8DddX49az4oKJAwv5IVcy7 +KfKmjqzvUuR/ObjJlQXs8XebiajKG4ag/uwsGdMjTRZYG29rLSmuen+s+BiK9110gVU bwwCu/4EK9kUdUOSWxHT5T1DJvEbANMiDQcwVI4vOYnCIxc4+wmSUUQ+3G6NXndRZ3sB uVDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843336; x=1726448136; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=P+BOrRZX+z2hSk8+9WDXjFN+ycwGfHwW0ETw9PwthSY=; b=Xfm6TFluZja7etM/yUuF2WBnHYbwxKH/XCrFD8uMjiB5KL2yPiG764CaDVylsc9MoX Gxw/SEaerBQQJ97lv2r/+GKl7hLVdR/Lm0uHyuOibc5DBkYm+ddHmBTjSE/LBOndLj6n PFeldagat1ssvubh0pEAHvziqZH/bgGcDchagcYPwwX06zFK6kmLHI5YYdKc/YyAF1Bm SqsmfZz3biIuOBEdJPJxlkZFGsaXlLZYn7ys6/76gzBWQ2dQMgmv18LxvdI4CC/IHuSR 6MeaF7uijm1JfKmyG3+sJU7IFpdkgfqVHjVYBzObOrlVF8E5zE9JboqKx2+KJVhkitzb sWfA== X-Gm-Message-State: AOJu0Yx5mqGlCcqvs1m3jGkR72mRkrobn3TK+eW6uTjs0Lqke6rEujV3 jD9biGJrRQrAQUOzQ1ZlwHOAdMzAsgMRHUfhOGk4Ca2bKzaY6e7rC2FNLA== X-Received: by 2002:a5d:440e:0:b0:374:cd15:c46c with SMTP id ffacd0b85a97d-3779a6129b6mr9127779f8f.15.1725843336543; Sun, 08 Sep 2024 17:55:36 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.35 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:36 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 00:49:36 +0200 Subject: [FFmpeg-devel] [PATCH 38/60] avcodec/elbg: narrow variable scopes 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: VL+ucIpLk5d0 --- libavcodec/elbg.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/libavcodec/elbg.c b/libavcodec/elbg.c index 22219f9a6f..c1b8d16cd2 100644 --- a/libavcodec/elbg.c +++ b/libavcodec/elbg.c @@ -74,8 +74,8 @@ typedef struct ELBGContext { static inline int distance_limited(int *a, int *b, int dim, int limit) { - int i, dist=0; - for (i=0; i 1) - for (i=0; iscratchbuf + 3*dim, @@ -175,7 +173,7 @@ static int simple_lbg(ELBGContext *elbg, int idx = distance_limited(centroid[0], points + tempcell->index*dim, dim, INT_MAX)>= distance_limited(centroid[1], points + tempcell->index*dim, dim, INT_MAX); numpoints[idx]++; - for (i=0; iindex*dim + i]; } @@ -201,20 +199,19 @@ static void get_new_centroids(ELBGContext *elbg, int huc, int *newcentroid_i, cell *tempcell; int *min = newcentroid_i; int *max = newcentroid_p; - int i; - for (i=0; i< elbg->dim; i++) { + for (int i = 0; i < elbg->dim; i++) { min[i]=INT_MAX; max[i]=0; } for (tempcell = elbg->cells[huc]; tempcell; tempcell = tempcell->next) - for(i=0; idim; i++) { + for(int i = 0; i < elbg->dim; i++) { min[i]=FFMIN(min[i], elbg->points[tempcell->index*elbg->dim + i]); max[i]=FFMAX(max[i], elbg->points[tempcell->index*elbg->dim + i]); } - for (i=0; idim; i++) { + for (int i = 0; i < elbg->dim; i++) { int ni = min[i] + (max[i] - min[i])/3; int np = min[i] + (2*(max[i] - min[i]))/3; newcentroid_i[i] = ni; @@ -289,7 +286,7 @@ static void update_utility_and_n_cb(ELBGContext *elbg, int idx, int newutility) */ static void try_shift_candidate(ELBGContext *elbg, int idx[3]) { - int j, k, cont=0, tmp; + int cont=0, tmp; int64_t olderror=0, newerror; int newutility[3]; int *newcentroid[3] = { @@ -299,15 +296,15 @@ static void try_shift_candidate(ELBGContext *elbg, int idx[3]) }; cell *tempcell; - for (j=0; j<3; j++) + for (int j = 0; j < 3; j++) olderror += elbg->utility[idx[j]]; memset(newcentroid[2], 0, elbg->dim*sizeof(int)); - for (k=0; k<2; k++) + for (int k = 0; k < 2; k++) for (tempcell=elbg->cells[idx[2*k]]; tempcell; tempcell=tempcell->next) { cont++; - for (j=0; jdim; j++) + for (int j = 0; j < elbg->dim; j++) newcentroid[2][j] += elbg->points[tempcell->index*elbg->dim + j]; } @@ -333,7 +330,7 @@ static void try_shift_candidate(ELBGContext *elbg, int idx[3]) elbg->error += newerror - olderror; - for (j=0; j<3; j++) + for (int j = 0; j < 3; j++) update_utility_and_n_cb(elbg, idx[j], newutility[j]); evaluate_utility_inc(elbg); @@ -366,7 +363,7 @@ static void do_elbg(ELBGContext *restrict elbg, int *points, int numpoints, int max_steps) { int *const size_part = elbg->size_part; - int j, steps = 0; + int steps = 0; int best_idx = 0; int last_error; @@ -415,7 +412,7 @@ static void do_elbg(ELBGContext *restrict elbg, int *points, int numpoints, for (int i = 0; i < numpoints; i++) { size_part[elbg->nearest_cb[i]]++; - for (j=0; j < elbg->dim; j++) + for (int j = 0; j < elbg->dim; j++) elbg->codebook[elbg->nearest_cb[i]*elbg->dim + j] += elbg->points[i*elbg->dim + j]; } From patchwork Sun Sep 8 22:53:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51472 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1500891vqu; Mon, 9 Sep 2024 02:04:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUUJnj6KzeH8WN/IeHGvQENtlMEGfgvTS1t2QLFu4efdMwf4aL9NHX11LRoyaPNU/N8Ln6RxkXFzZirIWZWgUkI@gmail.com X-Google-Smtp-Source: AGHT+IEGo4LGLFZ6MmwmTkvCum0d5A2qtJDDWXnNk8q7HBij/rAcyEPpijR7gosQ5ndNgs1UqFrE X-Received: by 2002:a17:907:9621:b0:a72:499a:e5ba with SMTP id a640c23a62f3a-a8a888da9b5mr293740266b.7.1725872649824; Mon, 09 Sep 2024 02:04:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725872649; cv=none; d=google.com; s=arc-20240605; b=QzmkmtVchVOr+t1prCrIN96NU7Kjxv34Q7iBlWdJOrAn/tXKGmxJuNKqMNw27tuxuy ZTJGy2yjF2GwBr6Ery4uNOf6MD7fNfZPX/VHXV0LRX0eH8qhwvnFacqTf7NrxUM031j+ eysElG7z+7jUERPH++f0V136DUyK2ikq3QXKj8rGEb/SRkQBwon1HnU6/YZ2BuqsfBGJ hpD2zZDS42PN6gn7dplAZGrd0xaGafjxaleSV9p3Du7YGZr7ONJk26lrBx7ignO/VyqA 0q+QgXLIQaPEMNsednoVPBq0hcCtqw5MJNHjCKX0WkLNM79QpCWpI8QnPLj9rPmSKVd9 WDOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=f2jmRJvUld9wOPoA34GK6vUfSM8E+rIccRMh343WEvk=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=X0mp6Eo0MFuGqONTJt+31QUHY2jgdZbIvOXmQLhFlNvsJPO3Z7dJEX6P513Os367jh 4qrFmxN1etOhm/j6kUdBmOS2qEb0bsO+oh/mQW1crmV7yRPX9mDSqjH6Mb/4OTFoKprM 7hmiF0YibHLzHb7+88kzv/PEi/dTOyDB1C9Rg92eqMlG6Zq2FX3RQaUYU0Cb+dBnFuRh 4ZUl/NHBFLehP0UL27vzX0ZaHlXkHw8rckVe10On8npz878E7lBMrxrn7S0pt264LD+s DqpOV1BbcSsbOQh4YQbefDSX6pi6SBPDGxyEl8PjLtYAgvTkGSCUNwcSsFMTuHMaV+DK SE+Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=XhaoWIaF; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25cf03b6si336328466b.547.2024.09.09.02.04.09; Mon, 09 Sep 2024 02:04:09 -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=@gmail.com header.s=20230601 header.b=XhaoWIaF; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4C2B468DCFE; Mon, 9 Sep 2024 03:55:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3649D68DD03 for ; Mon, 9 Sep 2024 03:55:38 +0300 (EEST) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-374c1963cb6so2256888f8f.3 for ; Sun, 08 Sep 2024 17:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843337; x=1726448137; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=zxGg3moVhihix473FszmSJ4CgUYawOEAtuZEh+wBGKk=; b=XhaoWIaFuCPLO/68OeajwadsygTwvoXdubwX+lTny0VBGIqjqCk7CzjUKJBtJB7Q4u vCB71aVxA6XFCVfhjLFd3imz/2ulzvZ4/uZf4zLCTkYDIqNZvjZzK6ro5ItvYEbSPUE1 y80L4X3ozN6r/hQysJSUo2lBZL9hx30hQW3PKex+ekZfxheZx7/c/jdroLpRgWuUiM9F vz2bxdM4lJVCmF6dUB+UoOvTUucSg2DdhfsEvhpLrrCW3bY/MI5DBoJYRXwKBnYIGifJ NZ0sqMO8kNls2o2+b17HPE3kgVjbTzjtt21mIgSoMTXPplnwslJYb3TSddVErgu93fpo z4QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843337; x=1726448137; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=zxGg3moVhihix473FszmSJ4CgUYawOEAtuZEh+wBGKk=; b=tUXmXyl7TO4R9KmTu685WQS6n1jlB9Dw1td7vDcsFKj2RxRxtoDQn7yliHWHLIzJlg mTv0YytIbhlhfAUfGNew4RvDKwEKww9W6s5oROTzqU5pCPdMe+0dRghxU9Eq7zHu6nm+ OsTEE5NbhTxMu/hYFzkTOmFibBqLno5eELVDPwoY+e4WNeumNjDSuD/72M5PQRezxu7p ISHZVgAo8bxUSEWFzf/4vAkDytouV+/Gu+TW7xj3DmqX6YIN3Jt6/ZTrjNUXIct+GgyH crkGCevoaMvftssKFSJJ0alshVpPpbLc9GRyFjcNLxNbmGinAMZitQ27FdJR6bB6IRyK JdXA== X-Gm-Message-State: AOJu0YyUy+IR8w66EkuGn7B+cFt6B1PKCx5B0QfQnOOrvHMxdq7wQV3y 81sgb5assdTxAxHE6wRnihnFg0jiN6ijGFmYwKandeuLSkZRx7v2F1QqQw== X-Received: by 2002:a05:6000:1182:b0:374:c847:86d with SMTP id ffacd0b85a97d-378895c8cdbmr5760326f8f.16.1725843337361; Sun, 08 Sep 2024 17:55:37 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:36 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 00:53:19 +0200 Subject: [FFmpeg-devel] [PATCH 39/60] avcodec/atrac3plus: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 90BY4b2tl4df --- libavcodec/atrac3plus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/atrac3plus.c b/libavcodec/atrac3plus.c index f17ed0cbb5..8ca6989c07 100644 --- a/libavcodec/atrac3plus.c +++ b/libavcodec/atrac3plus.c @@ -75,7 +75,7 @@ static av_cold void build_canonical_huff(const uint8_t *cb, const uint8_t **xlat av_cold void ff_atrac3p_init_vlcs(void) { - int i, tab_offset = 0; + int tab_offset = 0; const uint8_t *xlats; xlats = atrac3p_wl_ct_xlats; @@ -93,7 +93,7 @@ av_cold void ff_atrac3p_init_vlcs(void) /* build huffman tables for spectrum decoding */ xlats = atrac3p_spectra_xlats; - for (i = 0; i < 112; i++) { + for (int i = 0; i < 112; i++) { if (atrac3p_spectra_cbs[i][0] >= 0) build_canonical_huff(atrac3p_spectra_cbs[i], &xlats, &tab_offset, &spec_vlc_tabs[i]); @@ -103,13 +103,13 @@ av_cold void ff_atrac3p_init_vlcs(void) /* build huffman tables for gain data decoding */ xlats = atrac3p_gain_xlats; - for (i = 0; i < 11; i++) + for (int i = 0; i < 11; i++) build_canonical_huff(atrac3p_gain_cbs[i], &xlats, &tab_offset, &gain_vlc_tabs[i]); /* build huffman tables for tone decoding */ xlats = atrac3p_tone_xlats; - for (i = 0; i < 7; i++) + for (int i = 0; i < 7; i++) build_canonical_huff(atrac3p_tone_cbs[i], &xlats, &tab_offset, &tone_vlc_tabs[i]); } From patchwork Sun Sep 8 22:55:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51457 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1441700vqu; Sun, 8 Sep 2024 23:24:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVz4JwUE3so5nCZ3bfBjHvAQEa61Z3sC14SWMNuUnrV5pBgf3wZ+6dAImsA7cgll1Swqrk1hqx7HJPuiPNLTHIE@gmail.com X-Google-Smtp-Source: AGHT+IEbd5jRMWjAHuGJLoVJb9SltIW+03M1kvxFYxmy/zDWRzZCTJoYrTqlOaawzOVzXCAKaX/U X-Received: by 2002:adf:fdc2:0:b0:371:8cd6:b2c1 with SMTP id ffacd0b85a97d-378896c38ebmr6140169f8f.48.1725863060858; Sun, 08 Sep 2024 23:24:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725863060; cv=none; d=google.com; s=arc-20240605; b=gfGUcv8rE74fa9xHFaZxCTKsexfiUMyZTb+OVOsD+fJD5vVGBKXX1S3slxf3DTLXub rJ9K9GwKVl6we5LwF2BoarxkOJXEreT+Q/kwco/fMLvY3cQvK3lnDHmbygoq6ngloCX0 dAjI1WdPxcvzUm8aHl2kXI0Tf9ZoQ8LdgodeiPEFdgxNlF8fOSewUoyVX5O1BJdxDmxT NBX71BTQBoSLcXgRtmdbpqTt9xn0Qryz20ieJ6dtKh/s1LjRmksprY0gExxn1ds9Faxz J8FTDXPZTpQKMkmBUl/YGJgY3rAwGNE7WK4Fg06b3eM26ANhOo/VVJaCBnABv5C3sK7b qJFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=2hi2KI8i6UgW2zqKO0O2nkMQY9fHW+GUPf2HeQp+RNM=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=TcDMeZBRgd18cDnBnnERM0AC9W1oSaqwba88HRLAgqYaE+8oud8C66LAN+q3L9IBgF OX3YLiGwmRk3Oxoi/iuGZBa6bKPsY/HxWyh+wVDhgeQG3lSPc5xLNHbQqNV/d4oeGN6e DZBHzqEHuQFXEZvML/jTbT0zx6/xXN1QHUTtjUfN5YRTZAPOG1Xr/9ifHe+exHJFhGkY A2mhg5Ff54J75hyI/+/VgJrrjk3eIDsj8a7tcnyaXd5S6UaAVdHhQpY1jW0TZGegDipy Zz7bTOYUiD35fUgrOR3US1ECYTLgIS1aFYem/FtI6zOnz0EImUpaJVrezAvMMbpnkTSw eeAA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=KrUgaAO1; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5c3ebd42f6esi3276619a12.47.2024.09.08.23.24.19; Sun, 08 Sep 2024 23:24:20 -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=@gmail.com header.s=20230601 header.b=KrUgaAO1; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 67F9468DDD4; Mon, 9 Sep 2024 03:55:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 05EF168DCC9 for ; Mon, 9 Sep 2024 03:55:38 +0300 (EEST) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-42c79deb7c4so31990735e9.3 for ; Sun, 08 Sep 2024 17:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843338; x=1726448138; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=YANr8GwUJg7Tsj1TX3oUUhHyo1KnByBWNex9/XKJiP0=; b=KrUgaAO1bXJlJdr6oDm+I9UXQOnU/AnxOS8iUgFezdPJhdeCFI6egkhmPpVxtzD5ZA 0NEh9xy/8ew1dzV7IlMo+Ewca8oQ4obvQRyb1APF+AIlq4g55g7POCaV39JKhx7u+yS8 70RFDtXmuhvDuXWwnLkCpg9nZErJ957C0wIO403He5z7Justyn8DwiWEa5cyED0+Mk2G vsTcFjQ17mmgVVON3g/RRP3R5Y9gx497UxDJcBWe8nmp1I0YCadhNAWf6Wvl/4uoLaVM knY4Qgbo64y50Mnl4X/sBRWMWYGTWi0u/8GT5av1nVN/CLDTQ/AJhjYgeT2fJWV5Xvcw ARCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843338; x=1726448138; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=YANr8GwUJg7Tsj1TX3oUUhHyo1KnByBWNex9/XKJiP0=; b=WEX5TJVruJySnUomCoNi+/41biQpyDiShBIPM0t3i6tYBvn7huD0KVMsdH5Q+DT6zA bnELHiKEiUd67eUbxRQL97avYLHmcZB+SiEQ198v2pPiw88W/nAdDEjEZTMNeBcUBvg1 WkT6HzLGYQyhltheXQ1SVIn6CYcysTvVzjhq9zXIRWGUn3wWXagsMJgKpmA+DMwa9R8o epRzl7KcM3Ei0YodOgN3l1yD8lXjXpl1F3yMyYfNO0bglFuAAifuea4/dODheWDolbZw Ms+Ir0fUG9W2UaP6gnxAOIDVQDCPJhqtRi+pmURnSey0NctJj9BkzkptEX9o6sMd4vef XBBg== X-Gm-Message-State: AOJu0Yxy7FUcfo4PgCJ5mZ3U48Q5l2+30pnwOUgriL+uLTLPb/UgpRgt JL4OsdpELIXBpNgTQJZoLkue2cHyahxN25eb1fPf4tyxxzFEN/77EZnPcw== X-Received: by 2002:a05:600c:1f8c:b0:42c:b6db:4270 with SMTP id 5b1f17b1804b1-42cb6db448cmr11869305e9.11.1725843338165; Sun, 08 Sep 2024 17:55:38 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:37 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 00:55:13 +0200 Subject: [FFmpeg-devel] [PATCH 40/60] avcodec/alac: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 7Q1JYIRKQZHu --- libavcodec/alac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/alac.c b/libavcodec/alac.c index f91288e97c..7916a006c2 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -331,7 +331,7 @@ static int decode_element(AVCodecContext *avctx, AVFrame *frame, int ch_index, } } for (ch = 0; ch < channels; ch++) { - int ret = rice_decompress(alac, alac->predict_error_buffer[ch], + ret = rice_decompress(alac, alac->predict_error_buffer[ch], alac->nb_samples, bps, rice_history_mult[ch] * alac->rice_history_mult / 4); if (ret < 0) From patchwork Sun Sep 8 23:11:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51455 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1441650vqu; Sun, 8 Sep 2024 23:24:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUa+TjpaLpgex7y78w9ADyiFKAcIQfLKQnY0tm43MFzmKQ/cRX0YsxTdcDYzY+23xn3rEDZ6tcM6V2Pf2Zmnxqh@gmail.com X-Google-Smtp-Source: AGHT+IG6HBnDwVskE+UgWdg84jptOR6K8JAvp07ySzjLRCKaTKeqP9OpK16B/7k/CI8eONr6LI3d X-Received: by 2002:a05:6402:2692:b0:5c3:eb29:50c4 with SMTP id 4fb4d7f45d1cf-5c3eb2950e6mr1612968a12.8.1725863050624; Sun, 08 Sep 2024 23:24:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725863050; cv=none; d=google.com; s=arc-20240605; b=CaqxJs6BHNUOFbC7SJ5iAUAcMVcyYAOiwE9YPjwEtQWAM1CHk0AtxE7uge9pfgm86T LICtfgNdSCFmWucNaEUELLgkjfC8/joUWeUmJF+mRNifhqETj43zT9Lswm0pQiudKlnL e7mj88c2CPLBaSyzfA3oS3nOBks/57p09935LW7jU20CUnyVS7DQpai7wHLOkOZh2HHL +VIIo8mKi9ElbpH9AnlsleqICAJVY5cUmUCqwXxGOPZ6YXBTa22aykk1L1m6uU7wFTjd diRGSgZlI0gCPNnvNT9/NOk85NbVNH/NBUmME8esrI1265F0Rxk7izgzagUI8QBK9brd jJ9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=bfsGSc4Sc+zNJ5v0LaxmO+6W+nD1JpKv1N0g0ddgYgg=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=J5yzdrA8iqs0daDFPOT0Eod/ihcobV6eqr5FzInpg2yaP5mMhOx5t32idfO9u5pBQi Cjn9fWkw8eJTD/wfdAg6HYjLuv9hxkCMePPAccLUh/6D8/u8uF7JV83j//4RdtG6xyMV GUK9psX8pO1c8Z4UEG+98TeEiWAmwoM29XTnx9VYhzk48LXpxzRuU6TY2YKwXKuWf3uy fZ6KcpJjcfrLi3LAjyAPJqNwvjHoFiIujVXES3f3uvNzhus/ZtHM6L+c13G6q0ea5qcT fk7BZEoAT6RyyLSkZykbdr7ia7JGFa40WI8zUS/obSciS4LczC7z8u5C2UqZumrehitr bjeg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=asdUCBWj; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5c3ebd98406si3332074a12.373.2024.09.08.23.24.09; Sun, 08 Sep 2024 23:24: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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=asdUCBWj; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 754B368DDDF; Mon, 9 Sep 2024 03:56:00 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E551A68DD1B for ; Mon, 9 Sep 2024 03:55:39 +0300 (EEST) Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-374c4c6cb29so3383197f8f.3 for ; Sun, 08 Sep 2024 17:55:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843339; x=1726448139; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=2DbKZ0xlQ+M3Xq/ccicTowZDJLpMXxSjeSfCh2F+W6M=; b=asdUCBWjKNtzTZVf2i07hfBq7kgVr8kbC7QsxIfmWrOEuecyAjdjrgHZCdEaxpS6uW Y8Y8bW2kxIqIQIJMW6LZ6fMfP+KJxNWSwJpAyBjXnK0KoGCzzHTf9n22FotXt9SiBzS3 V6tRNpWlaaFyTDuL52GkjkjJ2LKNnxQG5WqOrYgOsWD8rBGr+9z+Q0MpPH35SnhXdX85 1Ft6Ppu0Mol+krNs3/+XlAR8XUDGOlKuieGvYaKk7BeDRGY3UiZmuDmGLrR8cC5rs5nW ZLRwIAAmuaa3ENsBSz/Fvz8uhtKYLbD9AmSQzpHLk1TaA+ikzq1cFA7geAM1iQ9kbdTX vVww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843339; x=1726448139; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=2DbKZ0xlQ+M3Xq/ccicTowZDJLpMXxSjeSfCh2F+W6M=; b=eLCSTGSRS+BC1hhi7AoiaO6owrpFPj9iPXlsUMITYlXmjAVx0Sk0gR9EavKwk5ieuP aMA6PgfpIGbl6GBAyWuclzNbvmgVKcOCU27str3o4+jkckaE3RBf6teswYWW3ld7e660 YNONdeP8G2sjTSwZiqLjauyqvbL7pHTZznlwhwqOdnyDfgbsefYDPmAlPaBbisqmaIKt MXYXrwScLHFP446gPTVzpCjraWN/Hz4gSyp6bC4BUNSEiCZTc5v+NEXmb5pNyD/lK98v GJInfI5pEQjkTPrTL45ArGKAvIfK3k1r3EF8LJQ45ijT+ecEi1xkwX1vORUVCGOwSj7H UYdg== X-Gm-Message-State: AOJu0YzFpBOjIvyU9FRJnsJ0z78TPx/2j0/oWhUUR7lL9jxa1wzP6uDm ruChzTJpWiRJ4VgtRr823QpFI6D2IBpHpDFMtbKx36/c59yA68FnpBcsAw== X-Received: by 2002:adf:f701:0:b0:374:c1de:5511 with SMTP id ffacd0b85a97d-3789229d6a0mr4522033f8f.3.1725843339117; Sun, 08 Sep 2024 17:55:39 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:38 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 01:11:08 +0200 Subject: [FFmpeg-devel] [PATCH 41/60] avcodec/ac3dec: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: B+ox2+VzsVZp --- libavcodec/ac3dec.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 0a4d3375ee..5cc47a6b1d 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -1492,7 +1492,7 @@ static int ac3_decode_frame(AVCodecContext *avctx, AVFrame *frame, int buf_size, full_buf_size = avpkt->size; AC3DecodeContext *s = avctx->priv_data; int blk, ch, err, offset, ret; - int i; + int sync_offset; int skip = 0, got_independent_frame = 0; const uint8_t *channel_map; uint8_t extended_channel_map[EAC3_MAX_CHANNELS]; @@ -1504,11 +1504,11 @@ static int ac3_decode_frame(AVCodecContext *avctx, AVFrame *frame, s->superframe_size = 0; buf_size = full_buf_size; - i = ff_ac3_find_syncword(buf, buf_size); - if (i < 0 || i > 10) - return i; - buf += i; - buf_size -= i; + sync_offset = ff_ac3_find_syncword(buf, buf_size); + if (sync_offset < 0 || sync_offset > 10) + return sync_offset; + buf += sync_offset; + buf_size -= sync_offset; /* copy input buffer to decoder context to avoid reading past the end of the buffer, which can be caused by a damaged input stream. */ @@ -1670,7 +1670,6 @@ dependent_frame: /* check if there is dependent frame */ if (buf_size > s->frame_size) { AC3HeaderInfo hdr; - int err; if (buf_size - s->frame_size <= 16) { skip = buf_size - s->frame_size; @@ -1680,8 +1679,7 @@ dependent_frame: if ((ret = init_get_bits8(&s->gbc, buf + s->frame_size, buf_size - s->frame_size)) < 0) return ret; - err = ff_ac3_parse_header(&s->gbc, &hdr); - if (err) + if ((err = ff_ac3_parse_header(&s->gbc, &hdr))) return err; if (hdr.frame_type == EAC3_FRAME_TYPE_DEPENDENT) { @@ -1752,9 +1750,7 @@ skip: extended_channel_map[index] = offset + channel_map[extend++]; } else { - int i; - - for (i = 0; i < 64; i++) { + for (int i = 0; i < 64; i++) { if ((1ULL << i) & ff_eac3_custom_channel_map_locations[ch][1]) { int index = av_channel_layout_index_from_channel(&avctx->ch_layout, i); if (index < 0) From patchwork Sun Sep 8 23:21:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51426 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1387984vqu; Sun, 8 Sep 2024 19:54:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXE8NcIqUFAv4IJCzZh0fFfv5Uo1ePpVNlc7Kvm0jL5KGHOd4j2sjH00wxH8gBBC7E81LHsmTr9HjAWnNesN26j@gmail.com X-Google-Smtp-Source: AGHT+IGzFaFbInDElDrS5OqRq2jSLs5M5kW7XEiwfenFc2lXjWnV5awZfZPVJk2w1zJfyM3BZKRn X-Received: by 2002:a17:906:c149:b0:a8a:9070:a6ed with SMTP id a640c23a62f3a-a8d1c4d7686mr732118266b.31.1725850450312; Sun, 08 Sep 2024 19:54:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725850450; cv=none; d=google.com; s=arc-20240605; b=CqILR+sOS613IpnwOFMRVlqhttd5xCwkM1ayFeeB/0kM6BUtFjmjOlUKg30UfR9cPj 5ChU4SN9LAO3xFftrRWxAlbNktvgAz7yW283NEKRVLnXe7yhbVIuY/tRA+UUwSvYBuXN w9A0QRQCfntndsCTnoN2KesDTpvIas+X+hP27UhcN3WdpG7DaYCApdI7PU5cvpjh7aTR VmwnrAthEZ50+4GhNoLVpMMqeiROeS/Rg0x1AFBb4qnfyfm/V7YAwjR2Ckq6npgtcKek A9RZkj06PO7qFs9SirM1yOkruPTmceRMDegsigXsmo19eOlnHayzkNIHTg7ZFp2QfcEn rHGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=8akFFd3xERKMN8FnbZBmtCAsfdyQHAvRnrEolMVrtro=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=FidJNRraEnMSFE6ltHQy+Oi5lLaizKTRT4DxDhDYWb8T5wp85O262h+9Swh/DMbBZ6 dV4OCm6qpd7FrvoCpvXSMscc49oYfAERpCZXjnUWqp+IMk7CiBBK/OyEurC4pTrYMSgY wYayBa7xlhmOGoiHH1vUrCoUi+gRLtiwEIMJSyVTwuMxtRohkNrUZpEYD6UBWnA7pSN+ ABya42n9shCRDBbP7ta4co3jVYUv6PrMvFzxMW54wlh3rb96bneHzCtaGOqtjJItpG0Z wI+1mREyz3lAmvt5NioEz37Q4MXL5EoluDL0H5cRyb+C1sJY/EGguWf4DPaKK9iVUzbB KfTw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b="WYLU4sy/"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5c3ebd4710fsi2999149a12.170.2024.09.08.19.54.09; Sun, 08 Sep 2024 19:54: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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b="WYLU4sy/"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5B9D068DDE5; Mon, 9 Sep 2024 03:56:01 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B4AD868DD00 for ; Mon, 9 Sep 2024 03:55:40 +0300 (EEST) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-42bbffe38e6so27372185e9.0 for ; Sun, 08 Sep 2024 17:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843340; x=1726448140; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=mnmMYTLLI+x7qSamLRilhZxf2yJOE8bBhjES6ZZzkSQ=; b=WYLU4sy/VSB3mSB94zYVezBS56ynPHsKbERgypAcY3JR8/ZRq2ZjXKQ8YGOdo66DHC GwffkWSn0lfw6FDabwRwtgGBsS2n7aLjfCAXioaVGz4kk60OSxtC8L4WdPVpM559ZC/0 BpDxhLRJGTAgaUHO1ZiZAe2QPVuPPye+p25jnnDg8r/CHZ7o7bdYGW3Ym/03W+uG1bQn Zt0yBsRzrp33vJ3BtmF1sTLPr4dDIJDCD5iLMrdGgcW4bxu9EuGvKwZjxKBMzdtaVMuw BGbgAQZ4w9EFvEL8kFFJPe/JU28Iduxm7dRwxNoBSerSXwwmGxBwwHBMUPlqxWC/W+1V 9WLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843340; x=1726448140; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=mnmMYTLLI+x7qSamLRilhZxf2yJOE8bBhjES6ZZzkSQ=; b=vEgdrMveYBeRaH7j6m1Gj14l27W0nLeJUIdIZQUH5bb2SvduL8n3gSG+zI7I06qOkk MBwQBAWvllf59GJsk6fLpD6bjvX4VmyTLKzi79dWOJFMzBVDrPZN97TYplXdA+r8knX+ C8t2kBIAE3ecWgDr7J25VbesG1NBEF7drbASBEEecnWBt2jZRD+KbECdP8wXnhoM0x1q z30pFItSKtSGwRiAJuiXHY+kxKL5AqCT0hZ5hH1o23JPkVzMK9zqP25WdlOnmXK9BlDA bxg7Rua1kmq8mrolGMMbgq52pxHZsE/c4p+A7U1VBpfrcwAWA165N5zxiL8ijFrpPIgs 5c8Q== X-Gm-Message-State: AOJu0YxR0Eoxskhq9pCxQvt8ruilok6cwR3QJvFZClkdaZpnFSMRv/wP bcB0hmtpxg60rBSzwbSkUa3gZO17rf8v1ieF6bymlONXVnbAbEuHnOA9lQ== X-Received: by 2002:a05:600c:1d14:b0:42c:a802:a8cd with SMTP id 5b1f17b1804b1-42cad760bcfmr43034295e9.11.1725843340046; Sun, 08 Sep 2024 17:55:40 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:39 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 01:21:51 +0200 Subject: [FFmpeg-devel] [PATCH 42/60] avformat/webpenc: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: mU8h5j2PHpB5 --- libavformat/webpenc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavformat/webpenc.c b/libavformat/webpenc.c index ce0d046aa9..5d0eed5a8e 100644 --- a/libavformat/webpenc.c +++ b/libavformat/webpenc.c @@ -163,7 +163,6 @@ static int webp_write_packet(AVFormatContext *s, AVPacket *pkt) avio_write(s->pb, pkt->data, pkt->size); w->wrote_webp_header = 1; // for good measure } else { - int ret; if ((ret = flush(s, 0, pkt->pts)) < 0) return ret; av_packet_ref(w->last_pkt, pkt); From patchwork Sun Sep 8 23:25:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51467 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1476508vqu; Mon, 9 Sep 2024 01:04:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWZnsF+OE9IOao4jtIYTEnFlk0nsqq2OH2I7NY/dAsLtJ2QDGAf9JJw1ds2H96M2/B7PNynAmqKBWfsaDMKscaw@gmail.com X-Google-Smtp-Source: AGHT+IHw79/iRNPkEEjFzjr/ffNhFeUY5Yx9i1s+ahb32BZj0JHnNt5oQx0gWE1Gf+jWYHQecviY X-Received: by 2002:a05:6512:3b0d:b0:535:4d89:5b52 with SMTP id 2adb3069b0e04-536587a2b7dmr3270917e87.1.1725869053899; Mon, 09 Sep 2024 01:04:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725869053; cv=none; d=google.com; s=arc-20240605; b=YIBNdry5mKdmiaAmr3ZUGFL4AyGpO1wqqaxKyHAeto8YssHX4EIFTy3BsHIbkNp6Zo VC5KY7h91HFKppWyAz8Tls9xbACKvA303EOvtWoAw5I0Zhtu0pTtijkrvf1Tm4KMrwuj IBr9e0gV9lugAoFW4xZ6mFcLBdxeM4H2f8cSz6qMqQRC+605QinPI4GolYqDD0D9/6cE ESU8fcyk28qBoiZdtuPdvQl1QlPCVIYAJK/oH4FQptmGBVtQKrMihfmCoKg0hSIBE3Nm QwKSefBeGrg+WbBrGe8woPxR09ML3UI7VvFqaLRvjVW9Rl+NqrEIfEKgF6W9+pKyMgp6 A41A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=elwM1Jhck7YBGtjCYooaAnMRitEPn8LVf9IExY4v5js=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=Ya2tn08S+yiWG0QuZdkX3ozQKVCVoS0X8pKb3ZpbVPXHjowjbdKO0/lm4jU6UAh7Np 7ssKMbod6Pc7TAFM73cnB1gkKCGevyuKcPIf5HRR3HBvS+pV/C2FfIXMmwsw/XScq3GW MvWVZg0yIBWuPA7jbcqk5m2+ONYkvoIvM0hv8SMoccAaZSYTOilT7/hA3AlDdiDg5w0K irzBz5bKgNWghgg8RrcAwH6bd9QkG5hc2UrSXJ8sSPz9B25z5VZnCyk4BtLlVyYQyeng i5hfzsKQ07i0lrp6xqaC2W3wwEHdWpX/ko+aFcp/ljINxVlkEYd3EcCqsLhGkT6zAZh3 Tnbg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=f2cPnAxH; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f86f488si1538171e87.189.2024.09.09.01.04.13; Mon, 09 Sep 2024 01:04:13 -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=@gmail.com header.s=20230601 header.b=f2cPnAxH; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 32D8268DDF3; Mon, 9 Sep 2024 03:56:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A99FF68DD27 for ; Mon, 9 Sep 2024 03:55:41 +0300 (EEST) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-42cb0f28bfbso12102285e9.1 for ; Sun, 08 Sep 2024 17:55:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843341; x=1726448141; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=/BpWyFAnNax6OS+D77buLhXhEdNlcCDNPV7RuHrRPVQ=; b=f2cPnAxH2N8v3DFFDrom4jcs/LpzW7AYjxUkSYINpKnDPDkAdGhUmSqyZlZAuvSQ5g f8ji1zCHnCyyMu0cSWE+IRkoJEydLnf8biDagazNr09VSNrF63uri3yg8BQix3TUo/zQ f5H8eq07NjxUAPDRcpCjUtFnr42xsHhxUNiCM4KTOoupvJk+zcWdB0jg5JM7wC8LtJBs NQK57TEdN5DOOwBZ4+8qHN1YqacJKutzHfIO6unKmD02FTndT0VFYLXn7uYEt5oYUlFS nXThGWST5ybkY8/BJsk/JkWTvvdYBK3btQzDFb+XiRZ1BmUhC5dB0VySL6pPCGPcRJxN /zgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843341; x=1726448141; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/BpWyFAnNax6OS+D77buLhXhEdNlcCDNPV7RuHrRPVQ=; b=qCkSR7cJVxhhsaB5TrocFpM/glkPrF8Iz3OqtxkzuKbT3NOb11WVS19s+8e0a5XKEk 4B0b1tSjqD0XGLe6oGbAYJU9jsZ2dnEYtoVlcbW7VN9gJuISo2GA3sovlHUtO92nY9eB 24vCEFW/9BWqJn14U/Iatyypr4rz6F5RchP/tWJi4Dcav+ZXs1ZNuXaO3EZ3gHHhER9p CALDBTiuNlqXXdjOWOiv1k3xfMGoupr800SzjQ54Vr5N9GY+aw5Y/vYVWd9nGs4sBV+k +QpuIANqxHh3AaoOrSEx81NVA2HToIZDBLWXXfCSnNTgUl5ou91w6/ZN++lWfeiweFrI iXSg== X-Gm-Message-State: AOJu0YzO94yFmKXHlI27nwvTMjewowptj9rovnMftaIq9RLvbc8bRrPg 0PFc/Qpw1UX6/mdl/ZxTbSOcX1wqs/IOgm8gvtxj7qh10GgMzdQucMFE2A== X-Received: by 2002:a05:600c:310a:b0:42c:8812:82a6 with SMTP id 5b1f17b1804b1-42c9f98a81cmr72132235e9.21.1725843340965; Sun, 08 Sep 2024 17:55:40 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:40 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 01:25:41 +0200 Subject: [FFmpeg-devel] [PATCH 43/60] avformat/webmdashenc: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: iHscd81qg2FC --- libavformat/webmdashenc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libavformat/webmdashenc.c b/libavformat/webmdashenc.c index 3d9badc0d3..a4940dd1c5 100644 --- a/libavformat/webmdashenc.c +++ b/libavformat/webmdashenc.c @@ -382,11 +382,11 @@ static int write_adaptation_set(AVFormatContext *s, int as_index) for (i = 0; i < as->nb_streams; i++) { char buf[25], *representation_id = buf, *underscore_pos, *period_pos; - AVStream *st = s->streams[as->streams[i]]; + AVStream *tmp_st = s->streams[as->streams[i]]; int ret; if (w->is_live) { AVDictionaryEntry *filename = - av_dict_get(st->metadata, FILENAME, NULL, 0); + av_dict_get(tmp_st->metadata, FILENAME, NULL, 0); if (!filename) return AVERROR(EINVAL); ret = split_filename(filename->value, &underscore_pos, &period_pos); @@ -397,7 +397,7 @@ static int write_adaptation_set(AVFormatContext *s, int as_index) } else { snprintf(buf, sizeof(buf), "%d", w->representation_id++); } - ret = write_representation(s, st, representation_id, !width_in_as, + ret = write_representation(s, tmp_st, representation_id, !width_in_as, !height_in_as, !sample_rate_in_as); if (ret) return ret; if (w->is_live) @@ -477,7 +477,6 @@ static int parse_adaptation_sets(AVFormatContext *s) static int webm_dash_manifest_write_header(AVFormatContext *s) { - int i; double start = 0.0; int ret; WebMDashMuxContext *w = s->priv_data; @@ -505,7 +504,7 @@ static int webm_dash_manifest_write_header(AVFormatContext *s) } avio_printf(s->pb, " >\n"); - for (i = 0; i < w->nb_as; i++) { + for (int i = 0; i < w->nb_as; i++) { ret = write_adaptation_set(s, i); if (ret < 0) { goto fail; From patchwork Sun Sep 8 23:28:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51409 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1362319vqu; Sun, 8 Sep 2024 18:14:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV8ZEY/y94P0+ys0QfSFJ6xx+I3cDGa+ddwXcOzfIkM0Bp7NuofHctDFDXt8HkM5ecBKet1E2t6iT8oDwafxxdZ@gmail.com X-Google-Smtp-Source: AGHT+IFIy79NoDpy61yfeqI9Jx2uPxPIDIRyDQ5nemibbWiXdSQVKQhujrRpJADCTYAMei4MN97g X-Received: by 2002:a2e:be09:0:b0:2f6:4e78:e0ea with SMTP id 38308e7fff4ca-2f751f8ac1emr30032311fa.5.1725844451382; Sun, 08 Sep 2024 18:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725844451; cv=none; d=google.com; s=arc-20240605; b=LrZINvJZxUteELKMUOpYo7tJhwbcbH7oK+IHgn/YX36ENL+Mn1aBwOAdP9YId+Nzt/ +0NyFBapMYH7AjCP0B7fYUSQqPhcU7ut4ihp7cSYxCYscUeoDXRhZZTyHFv9rxqU4nTU h79z1WeUY+CjjK722s0fL9szUSihdlpl+98uudbTR156fKh70dxNhVR/x4/6nytU10He qGeFbtB0unF4wWQtYV4aEkmiVtK/nHkDJ4NrlrCfXp0ohMKtrxFAf1MbYnOkpcvvLa33 AKq2nCHZsv5OMX25C+vnGkLtkn4KhNNQnVGdPh9twEPeKkeqSVG1fYR83WX0oTDrv5pa CLWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=msUKJCw3xO9lQGZbNNGqWVWWialELGV7wlk4knHTlzw=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=gu94Qr7xa3odAmRElLHX3HuxpWVwk2gZHNjcLyCUySq8iHRx0v+3utcTPVmWQ+Jb8q GX1iNt8ZP37EcYdJBDo/BZPElORIUyHTtCSJunGsPtJizmBKkRIyl0CcEsLtzhExv1Ah ax9C0Yq2faHaW10lDwkzFpYemla9qakMJThs1fEa+TAvqJvud/mS9DyvI8PfVTsuTAd0 oNSvw/KmYbiwq0LTkwEardV3HPxn8sHJ58If5V0xer+UXk+35u08OI6r5jS8XnsW87Hl cMoLwVAsD2kS3UFu47xgj4cqbX6Wgb0kcbpa1eXzpLzfxtNdsFJOAMTZ/5/kdPDL4Qsf Fycg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=eLKR+ecD; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 38308e7fff4ca-2f75c09c3cbsi12059061fa.521.2024.09.08.18.14.11; Sun, 08 Sep 2024 18:14:11 -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=@gmail.com header.s=20230601 header.b=eLKR+ecD; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 21C7A68DE01; Mon, 9 Sep 2024 03:56:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 61FAE68DD2D for ; Mon, 9 Sep 2024 03:55:42 +0300 (EEST) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-374c1963cb6so2256912f8f.3 for ; Sun, 08 Sep 2024 17:55:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843342; x=1726448142; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=fMcFCaa2sa847KBZxtJQlmitSpUgqg3E1kopM41StxY=; b=eLKR+ecD7Xoxfo28XWjpk/ocsw9oEva5ggSectLLwkoZ97SE7Jokx0JMLcWxvtMCP9 /HolwggugoL5KhV/UbMmCE9Gx4tfUwxZqAROYDkfYgCN51Lxr71/mpHbEqB/h+kCbX/X X03o1s8oi8itGOqtvmx3z3Sfjeltn9zR4Sj6RaUBiGUcQxfZ2zwtneLK/nqtAnjk4j3z /wJnx8j1SQvCBDMW2YrVKMHtcAajgKZZ0fjvSPBNsiif++ZLo/lyiOeSHoPbSaemj7Ow M4hcyB6yRvf79J9z45fgl1LDp38mY9HXMKRioq11qhaO4mS++Va1h4solPmWuailjuAU f18g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843342; x=1726448142; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=fMcFCaa2sa847KBZxtJQlmitSpUgqg3E1kopM41StxY=; b=Pfp9BgcSZ2iXKhmBjAp3ykPiLXpDVopNoGFkXJjS8GuZKdJnk0Lkq9f4pfgUK0A9gx Sdpw3jYX8XZRk+JcsjZ8eQG6NOIhTy3rBXRTPZcEgRnqRzw5/zM9jIizVdAELYID/556 mbAIvZYvHJ+UMIDrwR2Y/Eu/EluQGCNMQNxa6k1/+ga+lKo1huCnOdlmhtjzInmuk0nO TH33bpAgHruwePjnshC6kZPeksiKUF8CzEZMSuPA6t4Q/jNRSzJ4X0K9N+FbW5kCeYwu uoYwfwpzqfqkVxGRlw+azeAyYsTpNRE7L0CX/gaRWHTyHKba3e+ziDkC/bAYV+26qHRf NBhw== X-Gm-Message-State: AOJu0YxNLocQd+qQnLQxZyD4IG7QqVM6nth2Bs3fjkOEuDO+znwOB3R8 y3Drc4/ZAVmx7hjPpsWnVYxChGxV3ipgVLffnf0u1E2Q8fdNlzGVoUCoLA== X-Received: by 2002:a05:6000:184e:b0:378:7e74:cc25 with SMTP id ffacd0b85a97d-3788967e4e6mr8778763f8f.39.1725843341679; Sun, 08 Sep 2024 17:55:41 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:41 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 01:28:11 +0200 Subject: [FFmpeg-devel] [PATCH 44/60] avformat/vorbiscomment: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: bMVRIJFU3qoo --- libavformat/vorbiscomment.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/vorbiscomment.c b/libavformat/vorbiscomment.c index abe12fd586..af51c237e6 100644 --- a/libavformat/vorbiscomment.c +++ b/libavformat/vorbiscomment.c @@ -62,7 +62,7 @@ int64_t ff_vorbiscomment_length(const AVDictionary *m, const char *vendor_string return len; } -int ff_vorbiscomment_write(AVIOContext *pb, const AVDictionary *m, +int ff_vorbiscomment_write(AVIOContext *pb, const AVDictionary *meta, const char *vendor_string, AVChapter **chapters, unsigned int nb_chapters) { @@ -75,11 +75,11 @@ int ff_vorbiscomment_write(AVIOContext *pb, const AVDictionary *m, cm_count += av_dict_count(chapters[i]->metadata) + 1; } } - if (m) { - int count = av_dict_count(m) + cm_count; + if (meta) { + int count = av_dict_count(meta) + cm_count; const AVDictionaryEntry *tag = NULL; avio_wl32(pb, count); - while ((tag = av_dict_iterate(m, tag))) { + while ((tag = av_dict_iterate(meta, tag))) { int64_t len1 = strlen(tag->key); int64_t len2 = strlen(tag->value); if (len1+1+len2 > UINT32_MAX) From patchwork Sun Sep 8 23:30:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51436 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1398745vqu; Sun, 8 Sep 2024 20:34:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW8ssYfwMLrIgjNieWnJdwZWZYHM3C2SFhtnKXrRAtsnf59wHS8fKw8+Iwi5J8SkbWp3rRxgVb4X6fB7552STrK@gmail.com X-Google-Smtp-Source: AGHT+IGA4wgn6itVsIHopwKk0sDeAH5Yr4Bui6gS2AB9FxXoQDZqSdDQNMql3Ei2xt4o9JeNE8JJ X-Received: by 2002:a17:907:930e:b0:a86:9644:2a60 with SMTP id a640c23a62f3a-a8a885bffb2mr852495866b.6.1725852853759; Sun, 08 Sep 2024 20:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725852853; cv=none; d=google.com; s=arc-20240605; b=NOaNk2I+AAPiq05qP4tvQoqoCtxJrXO8oelEHXucjo0bUkDBr0YdNQOCOJd7pj/6ey f5HhycwBxXzIWfDrOv/gZeWhlq+60Y4Vsgm4aawKdUyyr7/BgY9T2Pj4sfJIj5kl3C9r uSKzHcA14pDtm1GaCMMMDTG95sj4UtN0Dr12czRvnQDKjHJHs5JDLOBWz3wSXl+vYEeo f9YyYl/+msaKKkc4kStLSVXU4I+XjpA3bySm0YKEYzRBNFgFpYrxKQT0rrYMXvoMzwzd 4XlbQCH96Yx++7L2m5Vz2Eah5QK6lp72+Mz4HF3UtTFKeNIGuX719LQtq+Ri7lW9e7pl BSWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=exZZjSVZUKFl/ZS0ko5mWDB8RnJZS/xQt21gi2F4TYw=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=Jjmbhy9SRp0yKwYHFCUDmY2PncpqPt9mHeYf1gU6Mn+qD80/W7oU8e97KRjHq4lizQ O3zs5wWFtGsIYJHAQyC76PaQPT+uu/41Nn7Y2MZ6019kWcHr6h3ojP0+0TaWqsPuLH9s Cggy7aVHkg79S0WjSIVf4a2e6+vQV7FHkhGq3vPz8DVePNegwr7I/smyF3Hqg19iDEUt WnlXIvzHlkRuditchbghCJVWFPTl0YeZ7+SF9k3AupIf2ybqZlyl63BfmWbeyDRThbWq WZOK8YyLs8tdKGMRFe02Qcflq+hiZrQEHUwcWf9ikUEIxRSZ+4rxINtLCt7RvEb7K5Zk nWTA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=Af1kV0vF; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25c5168bsi305510866b.305.2024.09.08.20.34.13; Sun, 08 Sep 2024 20:34:13 -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=@gmail.com header.s=20230601 header.b=Af1kV0vF; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 46AC068DE10; Mon, 9 Sep 2024 03:56:05 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 76BC668DD42 for ; Mon, 9 Sep 2024 03:55:43 +0300 (EEST) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-42cb806623eso3735165e9.2 for ; Sun, 08 Sep 2024 17:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843343; x=1726448143; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=3SHOWDcd72q9wOdyL0grqeD2xlFPMGBJOE1m357E6UQ=; b=Af1kV0vFYNBqMgB15kxaAsL7TzWxSK7HQ46dP0f0SOGubkwhSqpWfp3Kxw4Slziit8 faslbjtwLlOL54As1gnIAC5hhvO3NYJH29/cbLMKtYfoJBxA5KrpZlIrvG7TacPhJJSA diqHrm+/NnKWK94P7DqfoTzW+ViMRKdSVcBHb7q8BzPl8IMPJTqeyUd2AjCWtofF+Gn7 wPtFFttU1ymkRJPx/BFj124Q90fuzG3Y6eR5smfK01sXhNbjmAkWBk3BUw/9O3HJr+Zs Q+kv0uCONFFRwujdIRWEn6rZSy0OC0YCwJeNUp+NX52Y1uPHrBnYmcWAOpQikVG47t1F 4bvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843343; x=1726448143; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=3SHOWDcd72q9wOdyL0grqeD2xlFPMGBJOE1m357E6UQ=; b=xJy/lyvdu/wA1/7WLXhU3z/GyWooUTibvyy9xPxtGrgIUOqOY62CJRjJijXfG6oxrR RUM2HILf6sfrC/e1tcfS8vqluxdOKP+/3alEVRC3HzaCkzofMmYueRN6TwlrGod1FWBj JwYwfcPlrGE7/HE2shB1h3G4p/xHaUSjqooEDavaPTwQdZHlSLJWKeQm3xNxSb6fCVWc QUeRkIS31q/HGpSp4vVb2T1J6oGmdQ9pAVK4upW8+N5YXKWRS2Q1s1gTaDUB5RewWXBG RtjxoBbBBRu/A80xHbVqZb5nwINT5Lnbj0Hgj/cSSKp/XM4ppTH88OnEDXbp0kLphjad CM5Q== X-Gm-Message-State: AOJu0Yy71zz1efSZ+tXq+tNGiNPTJbk+LlNP4SMn8T/jGisr8+c3XxJP 3JTAuXQaBfuXy6tJrxN4eo0R3mFjtXORL33y2DuUM/XlERtES2oO48itcA== X-Received: by 2002:a05:600c:190a:b0:421:7bed:5274 with SMTP id 5b1f17b1804b1-42c9f984498mr78096945e9.10.1725843342633; Sun, 08 Sep 2024 17:55:42 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:42 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 01:30:59 +0200 Subject: [FFmpeg-devel] [PATCH 45/60] avformat/vividas: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: y/hqmbWjwrPC --- libavformat/vividas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/vividas.c b/libavformat/vividas.c index 130b81ebbe..4cad6c6456 100644 --- a/libavformat/vividas.c +++ b/libavformat/vividas.c @@ -417,7 +417,7 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, } for (j = 0; j < num_data; j++) { - int ret = avio_read(pb, &p[offset], data_len[j]); + ret = avio_read(pb, &p[offset], data_len[j]); if (ret < data_len[j]) { st->codecpar->extradata_size = 0; av_freep(&st->codecpar->extradata); From patchwork Sun Sep 8 23:35:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51435 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1396483vqu; Sun, 8 Sep 2024 20:24:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXHmuIVNo54a5t1+svQLlA2jM4M7pcf2wlC/9IHFBDae7NqxTeiCExnfSxcSJGZ9TGJNGkdaGYXCqv3PWC4G0DW@gmail.com X-Google-Smtp-Source: AGHT+IHP5gZA6NpB7APpa0JRJWqOS5MwAP21dBXBsaZjz4rQ7OVdVS/LwqH9DfnkOTH3i7EVkeZR X-Received: by 2002:a2e:a9a8:0:b0:2f0:23f7:8e6d with SMTP id 38308e7fff4ca-2f751fbab7emr26972081fa.8.1725852260232; Sun, 08 Sep 2024 20:24:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725852260; cv=none; d=google.com; s=arc-20240605; b=NnhqV0++gM0arxRqhhgJvi9OORxbf7oivuVWQKSTJJ820fd7icBmLb6epui5GF5XL6 ruoWVzTTxsoI1AKuU18cc29+y77uwelT5l47bMCk93Qns5yRZYkGgPkrOGc46Wfi7crs n2aEdmswrhGxJC07NvxyQeZkD4RQjH18pgn+BTmTPcigWJ7kZHGeutCxHM5FKkjM6hWM ffarSt/ARi0gFwVyWrp9Gln6wyNDff9A9OE4mh+wuo0EG8LGKKI/HeFmX3F8vCZRziyz N9aKzBsfBZ6lPt1xdHjteef52peLmO9sJnarZwzkaRZdt04bJwpUTLtFWaz07fsryHd2 4SIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=qg2oEH9Kf4jQ74H3Q/osE5z3WIz7qq04d9PcQEXqG2w=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=Y9ut233QeRn8fvxkyEv3Sr1Y6eqwS2lWawca6nAkVEt6k1XUWOF/twXaw5t64jsSb/ bqy/lGKgaQcDZnS13HKB6kBbbEEPRMDOw6Q9wDDbCX/O5TrrPbWpCZcJLqfg8316kFcu FDLiBGKiAslQIB/vdzPks9AvJoMthjcULnAjFQaal8uhJunomD9UBcpE8PFnxdlu3PyG ZW12EneYJhQ8kvbsJ0o58cvlsTioJZQMFgQW7Ea4I10QB9T8pP2Qs2iNXRo9Q5LSCE8y qDmbTRD/LKBnY7mmuDzKDQNkgedZo6dN9Wp3hlw2euY7jbXI6MHLtDu+D82JRtOXYTXW xGGQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=ju63uQ0r; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 38308e7fff4ca-2f75c0b857esi12777201fa.633.2024.09.08.20.24.19; Sun, 08 Sep 2024 20:24:20 -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=@gmail.com header.s=20230601 header.b=ju63uQ0r; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 35E2C68DE1F; Mon, 9 Sep 2024 03:56:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5A54268DD39 for ; Mon, 9 Sep 2024 03:55:44 +0300 (EEST) Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-374c1120a32so2167802f8f.1 for ; Sun, 08 Sep 2024 17:55:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843343; x=1726448143; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=BrJvW0ZCcXDx9lZwE1GE5DZKOev6ump3IZ/awozbnZk=; b=ju63uQ0rzs+PAeOMzqw5Iu2fMMIlekCo6vMGjLvCBkOXsMakg+s/TpzYC1QjCwBPSD A76tYLs1viDSQyTRoKH73B1GWWc5f6Babat/0ao3v7KWwcr/0dgZVPrBG4Yb8SocfUOa Fwsl4FllS+TL0g/1ew8yVlKOeARqGi/y0oOuN7EJt201ek2TR8LrZKI56srKvfZtMFJ7 nmHJGJu2SvxEz/S5pHdxQQdQUjEphGvVfrkj4NCt4JNIhfKUaD76LpPymEXcrWgC7weo SdWyTRipMhu79RreIuYhZ/xWuqkRynL7BaR2KYqNIDjUrJffbSBwxV5iM4qnVVJ0IPVJ WyNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843343; x=1726448143; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=BrJvW0ZCcXDx9lZwE1GE5DZKOev6ump3IZ/awozbnZk=; b=Qs4j4ISqA3+cO5T5GtDWBTJSKxOBfSxHuMye9+D7x9RoCOuFbGX0DefDUT3Nqah5z1 zy+jnywKZvx1XJzN2aqjKFoGQAPrvSoxz9iL+GT3GcDkxdl16OgLHNXcmS7+DFb+ZOK7 XfaX2lNrvrBJMjCmhmHWe8XMDD5WY0L7eExVujuoQFzdTyeNTOa6WJg406aw2dCnSirH xt/d87kjPJHrrZQ4hI9k0A5DowVrKOuUXwM2f/dfSwu3g/EyMQQTpKc8kyD3/Mfzekwt Cx9kGkMb3Pzmk2ojnj3SLzVv9/t2rtL7X6lnqItndIHidRq4f2suhVIOC028bKF3UqBk X+fw== X-Gm-Message-State: AOJu0YwNdkz8qKsgpX0XKq4ZRBspxNlVx3rFnsFzMCxIzNEErtrHRjFv 5OrqRSk4m5cWIlM6j09RUugtK4iF6Koa7Jys3QKVyiJK4YbAcxjurd/XOw== X-Received: by 2002:a05:6000:e91:b0:371:844f:e0c with SMTP id ffacd0b85a97d-378895c5c43mr5337473f8f.10.1725843343603; Sun, 08 Sep 2024 17:55:43 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:43 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 01:35:36 +0200 Subject: [FFmpeg-devel] [PATCH 46/60] avformat/vividas: narrow variable scopes 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: fEfziImRMxeN --- libavformat/vividas.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/libavformat/vividas.c b/libavformat/vividas.c index 4cad6c6456..e984dd0b21 100644 --- a/libavformat/vividas.c +++ b/libavformat/vividas.c @@ -282,7 +282,7 @@ static uint8_t *read_sb_block(AVIOContext *src, unsigned *size, static int track_header(VividasDemuxContext *viv, AVFormatContext *s, const uint8_t *buf, int size) { - int i, j, ret; + int ret; int64_t off; int val_1; int num_video; @@ -296,11 +296,11 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, val_1 = ffio_read_varlen(pb); - for (i=0;inum_audio != 1) av_log(s, AV_LOG_WARNING, "number of audio tracks %d is not 1\n", viv->num_audio); - for(i=0;inum_audio;i++) { + for (int i = 0; i < viv->num_audio; i++) { int q; AVStream *st = avformat_new_stream(s, NULL); if (!st) @@ -394,7 +394,7 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, avio_r8(pb); // '19' ffio_read_varlen(pb); // len_3 num_data = avio_r8(pb); - for (j = 0; j < num_data; j++) { + for (int j = 0; j < num_data; j++) { int64_t len = ffio_read_varlen(pb); if (len < 0 || len > INT_MAX/2 - xd_size) { return AVERROR_INVALIDDATA; @@ -410,13 +410,13 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, p = st->codecpar->extradata; p[0] = 2; - for (j = 0; j < num_data - 1; j++) { + for (int j = 0; j < num_data - 1; j++) { unsigned delta = av_xiphlacing(&p[offset], data_len[j]); av_assert0(delta <= xd_size - offset); offset += delta; } - for (j = 0; j < num_data; j++) { + for (int j = 0; j < num_data; j++) { ret = avio_read(pb, &p[offset], data_len[j]); if (ret < data_len[j]) { st->codecpar->extradata_size = 0; @@ -443,7 +443,6 @@ static int track_index(VividasDemuxContext *viv, AVFormatContext *s, int maxnp=0; FFIOContext pb0; AVIOContext *const pb = &pb0.pub; - int i; int64_t filesize = avio_size(s->pb); uint64_t n_sb_blocks_tmp; @@ -463,7 +462,7 @@ static int track_index(VividasDemuxContext *viv, AVFormatContext *s, off = 0; poff = 0; - for (i = 0; i < viv->n_sb_blocks; i++) { + for (int i = 0; i < viv->n_sb_blocks; i++) { uint64_t size_tmp = ffio_read_varlen(pb); uint64_t n_packets_tmp = ffio_read_varlen(pb); @@ -496,7 +495,6 @@ static int track_index(VividasDemuxContext *viv, AVFormatContext *s, static void load_sb_block(AVFormatContext *s, VividasDemuxContext *viv, unsigned expected_size) { uint32_t size = 0; - int i; AVIOContext *pb = 0; if (viv->sb_pb) { @@ -526,7 +524,7 @@ static void load_sb_block(AVFormatContext *s, VividasDemuxContext *viv, unsigned viv->n_sb_entries = viv->sb_blocks[viv->current_sb].n_packets; - for (i = 0; i < viv->n_sb_entries; i++) { + for (int i = 0; i < viv->n_sb_entries; i++) { viv->sb_entries[i].size = ffio_read_varlen(pb); viv->sb_entries[i].flag = avio_r8(pb); } From patchwork Sun Sep 8 23:39:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51416 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1368459vqu; Sun, 8 Sep 2024 18:34:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWoLhHqnlSNMM5u7TDhK1BwRLkDiBrGCjR0fUbMoifySeoVvg/v46OJtQlXQeIQ6dvbcCfvnshBLbtdxeQ+5HMO@gmail.com X-Google-Smtp-Source: AGHT+IEVU9+ct+Mp1jV9W65g4HgzQbrOn6h1oZLYcTritbjM0LwoLEtpMXnnOmiJKyLviuk2fpTt X-Received: by 2002:a17:906:f588:b0:a8d:2624:1a87 with SMTP id a640c23a62f3a-a8d2624259bmr149523466b.14.1725845688800; Sun, 08 Sep 2024 18:34:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725845688; cv=none; d=google.com; s=arc-20240605; b=XooC2QBbIBeSCs3ksrwYzR7UKU8u2rqSLYo7nkMUJcB44dk3HMjgWOnij+caLpRF9a RQnzxkxCQbEmb0MDhiHThsggHQc5/iA1L9kXLruLTEK6vG/cCwHJFXmPkOKXJCQp2q2p NRANpn4n6/cWZic/OLAaE+3lsiYyA2Gx1RteO64gnVWAnVyAUuyDyJ0/r1fTzsgypKjN zTfryWA7Balvfu9KJGZddzem4MwUyZfEqfuFvKxc+/lUkz7Ib/hX16gVm0cTzIDsAwam QMxD0qDPHVeUGhz6Muv5zIvg/b9YZSpoD4WgJex5Z/7EaR4Ir+NAnaSi7TLenjsRmaTv B2hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=4Oz+LmpJnyjSnhlm5fdQVJI+NqTNpVO7WYo+pZ4aR8g=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=ENuVoaUAR6woWOEk5bl6AcgEtgLDPX/Pg2ZjRqFk4ZY7pfww6rap8HKK2gQyLRDak/ L3/+HprGfVAKHYPljad53Fil2u8y1nEuJN/sdP8Cu7JW/BhuEppvs1NG0InqjE1rzUh8 KMD4McoRLRcEtUn/xMspj3wD/Dnf4qwUG+PR9NoWzVBCt79Q3C9+eDQlN7GTZG5Gl9a2 /ViXaezmWrblDJJiPPQP2LWuRZwQNWZF5alxf5Kmnj/LTZLd/vwQWK9P1Bhfia6+ITqM 3JM+B93wXcsUML3HkdTRH5YhhwuoRhe3tVQEf92EjAM+hc4iR1fkLETaccVA+PFTm+oY iuXA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=hCxeF5a2; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25c515aesi284212866b.342.2024.09.08.18.34.48; Sun, 08 Sep 2024 18:34:48 -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=@gmail.com header.s=20230601 header.b=hCxeF5a2; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DE84E68DE29; Mon, 9 Sep 2024 03:56:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0A7D368DD42 for ; Mon, 9 Sep 2024 03:55:44 +0300 (EEST) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-428e0d18666so33656095e9.3 for ; Sun, 08 Sep 2024 17:55:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843344; x=1726448144; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=SJOXBVmh7tCOoTkiCwFoVikjO7ZoESAssbyjtoW4Yww=; b=hCxeF5a2nT1F3k/C6E6xr6gj/ibQhTzGIhD134W3GlUKPmVVP0/btc4OxdSBwbhUZA 35h5TwFj2465JYR6RKhe/6cbQkdBNx79IqBc7sIvinFsq5JxMvEWxTYBor2h9tf6JbqJ dFNW+c3M/CvRAMevV4wRWagYr+Iivm4ibidvFqJwfJ9Pt8+rGVeZ7kwRiqh4kVpYxYxd wWy3ztqIrc35xNzboT4QKz86IkCTNLNE+bMmUAH/kB7K2Ee0lkIGujpSiy+rQmOjit7m 9zi4vEJiJMyFmgqhOyrb+Rsj5A7hCN+6yeQgs1tnxmfoVQ9IUo+xKQ0VXLGc20u9+496 utQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843344; x=1726448144; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=SJOXBVmh7tCOoTkiCwFoVikjO7ZoESAssbyjtoW4Yww=; b=IVElClOQoQIPi3YxZgFOuLg0LId/k8y0zwvUSj/oPHJZALM6XhMaYRejo3Vg/3+uDb mLrKxQsXLgzzBgLwO9v5E5NM2Pt878+3ysbPPklu2PLCdrbTZgFH604vYxF0prGw/aDF nbE9m9o11LWRftNWZSnR03g3FZajJugrxaLBsoMABhutVNOf58eQ1mxTqCyZMETyLi9C 1GjSdTqRfCwLu2OU2n9XlEZ3JteLcgk8T7xe840o19c+51nXdwFnQVCajtByoAsAlgaW 1miGRGvn2yo6sZvZKoFw8pySqyfJKKgIu8vav0Q+SPWyYMTOIcWJI6Zt3ws4EaViee3Y xqeA== X-Gm-Message-State: AOJu0YzPhEiPUxeoJ4+tCEPi/oNi9PC8c1OawN5IoiymSvNvSmbu6saS pcTDuIm9N4p3DMrFb5O8+lekaHzT8wYaltlYafFUFXqdnMUyo6gEqi5vdw== X-Received: by 2002:adf:e242:0:b0:374:c2f5:38a4 with SMTP id ffacd0b85a97d-3788969fad5mr6614367f8f.51.1725843344283; Sun, 08 Sep 2024 17:55:44 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:43 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 01:39:31 +0200 Subject: [FFmpeg-devel] [PATCH 47/60] avformat/yuv4mpegdec: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Yf4BnITFx1Re --- libavformat/yuv4mpegdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/yuv4mpegdec.c b/libavformat/yuv4mpegdec.c index 2b66a1e596..61b5a9e17b 100644 --- a/libavformat/yuv4mpegdec.c +++ b/libavformat/yuv4mpegdec.c @@ -36,7 +36,7 @@ static int yuv4_read_header(AVFormatContext *s) char header[MAX_YUV4_HEADER + 10]; // Include headroom for // the longest option char *tokstart, *tokend, *header_end; - int i; + size_t i; AVIOContext *pb = s->pb; int width = -1, height = -1, raten = 0, rated = 0, aspectn = 0, aspectd = 0; @@ -197,7 +197,7 @@ static int yuv4_read_header(AVFormatContext *s) }; // Older nonstandard pixel format representation tokstart += 6; - for (size_t i = 0; i < FF_ARRAY_ELEMS(pix_fmt_array); i++) + for (i = 0; i < FF_ARRAY_ELEMS(pix_fmt_array); i++) if (av_strstart(tokstart, pix_fmt_array[i].name, NULL)) { alt_pix_fmt = pix_fmt_array[i].pix_fmt; break; From patchwork Sun Sep 8 23:42:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51420 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1369572vqu; Sun, 8 Sep 2024 18:39:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX0pJFMya/2LfbZTQLSDBRRXf31RopiKqRhi0QaTyT2lHovhpGMgxzLhZLw6pAUx4CEOAygfFx6BprFMBJvkM9Z@gmail.com X-Google-Smtp-Source: AGHT+IEufZKt/izC1+iChZHjjubc/fKtOGyRNKPGYtgcYpJEDf1v+HPqG78agivl12myHTi0Vf7U X-Received: by 2002:a05:6512:3d1b:b0:536:55f2:2ad0 with SMTP id 2adb3069b0e04-53658814568mr2805915e87.9.1725845953991; Sun, 08 Sep 2024 18:39:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725845953; cv=none; d=google.com; s=arc-20240605; b=CsJXL7bPLhvnY0F8xNpUXCnLgF19t9w4if9cuKL4cIshnqgrdXlTVJytwiwjLA64GZ J06SQZaIqEW3KLuMFni5khLgPlonpKwcVcNyaHs+rh/EpQBlIR+FzRFXu3qnttrqPVpf qubznbYWyUC7Ri34+veo9kfcBvY3eBImU8DfxSSx4P8ALgwCTnvs70qWHQ2cpF4xj0va mo0idlSMFV/QYqwohNblU3p/VtT6YJV8VkJBEJL+DRqL6jYkjmO0GhtjWtDaAIVgknBo A9VVXxlg2c20Qu2mhMxxMAmTT/sf9Ir+YEUBYv0pJIzspiOEx/1co7Swn135UmJZT92n nHGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=lOTRPvTQePPzclzeksWD931B5mDBq35fIVug29bOOFE=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=VbGnL6MI0gUSEXDCLchtXioEZUrHd9zY/73fJ3qlMZkuwZwGyNuq+jGKEsrp88kTDg 7/HXhjwAOra35vPIcIPJ+qD8Ht/xLjf+5hJ8j7MRJiSNtKQVDRVwKqULNIDZbAHpRKA8 msrvldLBJqK8LnoWxYZWe8+N0C2XPeZK/zsb7xpsUqTt46yghH9YxbWlKmJWK+/xaKLj a1rIdBtmmEVLXpiJsdr/yH9Iz2qKiIfIRmIkV3cdvotCFOdiCqtQA7niamQ7gtuukkIb P08M2zuZTPyyHHEYPpHrS/1jsmRFo1OQN50BnChoPskUODPFq98np3WPA0JiS2TnLOmZ 1AEw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=Iqr7bPi7; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f8c13b9si1200831e87.293.2024.09.08.18.39.13; Sun, 08 Sep 2024 18:39:13 -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=@gmail.com header.s=20230601 header.b=Iqr7bPi7; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0962868DE3C; Mon, 9 Sep 2024 03:56:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C4DC868DD5F for ; Mon, 9 Sep 2024 03:55:46 +0300 (EEST) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-42cb7a2e4d6so4100675e9.0 for ; Sun, 08 Sep 2024 17:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843346; x=1726448146; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=NtbTdyvkaYEicsTcOKV44hxg2Ts4tqLCn24krgefVFY=; b=Iqr7bPi7aIFFCTTkK3ai3rumsmFfTILPDli0Vla3P6A4XuzzFzpI/msbs8I0s90E4O zHn/F4KZTxUlP58DMiDb9MZukIwJFWzwj3gS7DHKHYD0Wp5VvatDjU1ZV4aU5CNSUQ1f r3RRBbZnMYl6ozXWIxhkun82ACL91ahC4HbySqdl1nR9hIlowygI5m9f+mPMCjUFKRDy koeBE1B/8LSZqw5v7HrkvSG0RCDJgpr3H+UAOs4XrdVcZ9v5q76XOWMMOhElkT3z0jcO NEN1Ms01+N3drNnB4NuB1xYUjW+BoR1IJYclTurukqynoy1ghkRaYHkohik1BZ38sv0D VmjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843346; x=1726448146; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=NtbTdyvkaYEicsTcOKV44hxg2Ts4tqLCn24krgefVFY=; b=XvVSUy2a5FfZNnywH2sZ37tYufHQp3AI0QRgALFXbuQIcTpDWL7G9H53su5GKgQpsw ynbw3PFhtksqde+sTcE76v3x9jEu/MsjhO3Vg5LXqvzJmLzztChjfB7ZSZsH1tKvOUVc 1LB0M6v7gezS84N/kB4hzYwfpki0/+FT1jG8t80UHZjXwX7i8AudlZEwT6Q70ulhZoLQ dxvZbUTSNtfhKWiLMwsHovHkX3TErysDfFtLkELTjaELKMqAuWRcCS36rtzuHZOjq+hL YVxDyEJCnW+D/TlsENmez1OHPgAIKC+9Gr5lEXNj2EgXaRRwYz1vQq15DOxJpXqMxwHU y5Sg== X-Gm-Message-State: AOJu0Yzw6utlN0mLhFzkRtfv24+DTAfFZz4gRtGiImFvtj2hKBV72amE te9lfcu9QgpZ8EM9FnJjoTwEjLwzyUdcRArgYu/9VemO4AL7HAwmcC58/Q== X-Received: by 2002:a05:600c:1ca0:b0:42c:b995:20d3 with SMTP id 5b1f17b1804b1-42cb9952478mr1660055e9.26.1725843345007; Sun, 08 Sep 2024 17:55:45 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.44 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:44 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 01:42:25 +0200 Subject: [FFmpeg-devel] [PATCH 48/60] avformat/tee: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: eNQ54Jan/J3b --- libavformat/tee.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/tee.c b/libavformat/tee.c index 1a2a8ead82..7ec9ab4800 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -65,7 +65,7 @@ static const char *const slave_bsfs_spec_sep = "/"; static const char *const slave_select_sep = ","; #define OFFSET(x) offsetof(TeeContext, x) -static const AVOption options[] = { +static const AVOption tee_options[] = { {"use_fifo", "Use fifo pseudo-muxer to separate actual muxers from encoder", OFFSET(use_fifo), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM}, {"fifo_options", "fifo pseudo-muxer options", OFFSET(fifo_options), @@ -76,7 +76,7 @@ static const AVOption options[] = { static const AVClass tee_muxer_class = { .class_name = "Tee muxer", .item_name = av_default_item_name, - .option = options, + .option = tee_options, .version = LIBAVUTIL_VERSION_INT, }; From patchwork Sun Sep 8 23:43:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51415 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1368456vqu; Sun, 8 Sep 2024 18:34:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWulh93x1sHrMPHtPeZJg5aOkOJ3VHXWlXLNbY9Nuuc3A0snt/Qn54z5h6x0FINumRWzH0hgzNispSgc3zUKd2n@gmail.com X-Google-Smtp-Source: AGHT+IE0W69hUlRNGpiLdv4FyyE+1xLu9VuH1dPpkz+xl1pEvOVkfBUbBteOOtBfiGiSMAwOgEbK X-Received: by 2002:a5d:5d82:0:b0:378:90fe:f753 with SMTP id ffacd0b85a97d-37890fef859mr3203384f8f.28.1725845688198; Sun, 08 Sep 2024 18:34:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725845688; cv=none; d=google.com; s=arc-20240605; b=Dt9JN8EQQ1DCQLLuNsY9y0X0Uk3G4omvA483bFND+PWd8tbZiNbGxCBg7TCuNBIXi6 TrAqF27IAE3rHB3RDyE8JV9q7ymRpgGBksuMhu1YIUiAdZdTKh13zhbJUJaboiGogkQD Bwo7ToPSOlpVy0Mj4i2QZHTz/lTB7aD2eusRCXMSW5LArpXeUX+qxc2aVf4J1EteOW6U x/TwRZe3tf8IfgJZzTM/WLR4Yu9OgaD/FDaugAL+CNR1Ikr1XPTiIpixi+/b9TdLRjtz DiKJBW9OSy46x8ugOHfMaasTRGTmdTiwOYVFlq8tqqH1iIx/d+xWGVdgtVZvmqw9omd/ Qvzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=IO2lkKIOjjmG3TCBQM8mEOHv4TH0DpUhLNCHhE0UwLw=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=gzqJQSRp5D3oy5OmE1PeTlZg2Movajb5bNcxhTM4Wj9UlLXnzpxhD3YBda1zOWU6MH x+ExROdNcst8wict4cEmL41VFlDVCr10xwgXcgY1rvfn7fUsDVzLMFsc5h9Lrz162+/6 YicPX+/Ck07lYgSkc4QZX7Cru1trjVPg0XymSB+7wGTu2nkLTrkwBkkNriXJA1l0vSOz y1UWrsTxYz1Es7kAT5xXNoCpANcg1SmatNRqdVDq2gM5EwDoHcn5RjSXYFNASAhlh0Os X3GzzdJdl1ktcYoGMyKRqMGQxcQdvCYXPfvXtxQdAJLhNwQAi/GL7pdWBPTMOW+csMXS G2qg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=AYnYQEci; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5c3ebd9f69dsi2831465a12.468.2024.09.08.18.34.47; Sun, 08 Sep 2024 18:34:48 -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=@gmail.com header.s=20230601 header.b=AYnYQEci; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D60C168DE31; Mon, 9 Sep 2024 03:56:07 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9C8EA68DD55 for ; Mon, 9 Sep 2024 03:55:46 +0300 (EEST) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-42cb8dac900so2282215e9.3 for ; Sun, 08 Sep 2024 17:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843346; x=1726448146; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=eU3i9pmrnpVIUq46oZfQzSZy6XOFBiMWe7Q5Y6U/rlw=; b=AYnYQEci2F4jX+upmpwohUwJIYWn1nNM6aPajRxCl5YuzWd1LZ2Uvq0zFvdiOabWAT U/zHaXPO6dtou2kTLApOos3Uhbia8jgLyu+sD9hxP9xNmhC7WGBQSEGV1U1KXe9GGbwm WK50fo972vw7F817mT6/bgnkeovwBKwbHNyuVd5iOCktM804PAv7iLCjY52EaAQ9MaqU 163jLCXpmqgIstOX0MpCdiv16+g8XPweydUCwnodJzQJ+sbZUHaZ782JVk/glW93vUut Pr0LfMuXbkqbjivODj6CV0zktV0qoSPBQAdnsjs6SRd9uYs2IW5smg8i5ntR8BW6DxrY IEFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843346; x=1726448146; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=eU3i9pmrnpVIUq46oZfQzSZy6XOFBiMWe7Q5Y6U/rlw=; b=rfUZ+T9v+HeGiiOd5xpiCKWGIJ4diViBF0m8W/FIe2o8+6na3NMwj1qQyHAynRMvO/ 8NRb20YBCjgQOv8rSBT81QnbSCFqo0wYAbnWcYhh+CBx+ONbu2W4PLRiRpDUkTa4L6Du +687WPcaj4YNqmGcx4DRIer4qtO3ett5S303eDWlR86/sV+XSHn9XvPcc2EagzM42Nv1 BhVxxO0H71aPgewP5knOW32j0v0AD8ROyrF5AosZk0Wq3X185SXZ8vGGAo39AsCKjUDc OeYuzilWvBTGO6QtomS4JlVL0XNahYoI8Sz9o41jdff+BydfChqAagpZiEK5ixlNuP50 FopA== X-Gm-Message-State: AOJu0YwSQUUF1JpN6zETavrPcmbCHjmU+OABdw0zR/j/KyKVRbLeQB5I WDcd7ztKS0wOfbv6GCou+nOcXMmPU3j9jmiWOZ6pbdahO61PCoEHzaBWbA== X-Received: by 2002:a05:600c:1c99:b0:42c:b4a2:a1aa with SMTP id 5b1f17b1804b1-42cb4a2a3a4mr18845845e9.17.1725843345923; Sun, 08 Sep 2024 17:55:45 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:45 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 01:43:23 +0200 Subject: [FFmpeg-devel] [PATCH 49/60] avformat/srtpproto: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: BWDWuJqH3ePK --- libavformat/srtpproto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/srtpproto.c b/libavformat/srtpproto.c index 02cf156327..cf6064625c 100644 --- a/libavformat/srtpproto.c +++ b/libavformat/srtpproto.c @@ -37,7 +37,7 @@ typedef struct SRTPProtoContext { #define D AV_OPT_FLAG_DECODING_PARAM #define E AV_OPT_FLAG_ENCODING_PARAM -static const AVOption options[] = { +static const AVOption srtp_options[] = { { "srtp_out_suite", "", offsetof(SRTPProtoContext, out_suite), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E }, { "srtp_out_params", "", offsetof(SRTPProtoContext, out_params), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E }, { "srtp_in_suite", "", offsetof(SRTPProtoContext, in_suite), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D }, @@ -48,7 +48,7 @@ static const AVOption options[] = { static const AVClass srtp_context_class = { .class_name = "srtp", .item_name = av_default_item_name, - .option = options, + .option = srtp_options, .version = LIBAVUTIL_VERSION_INT, }; From patchwork Sun Sep 8 23:50:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51406 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1359020vqu; Sun, 8 Sep 2024 18:03:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUjU9GGMQtokLl8KO3Hb8a++hHUY4xBgbq4Z3CFwnaJjeZf7EJOdTx/1yF0/xkGF6pff4InS7+XjPZbZahT6vbX@gmail.com X-Google-Smtp-Source: AGHT+IHaOfnXol96AzdIvs9/if0Lcg6bmRZREEfy7oK9xD+Ixap6ghQ9XhZJ2kBALwdOXctnXOZU X-Received: by 2002:a05:651c:543:b0:2f6:c683:553d with SMTP id 38308e7fff4ca-2f75a986f2emr41710031fa.15.1725843785217; Sun, 08 Sep 2024 18:03:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725843785; cv=none; d=google.com; s=arc-20240605; b=i0WQCfbOzDyCLxESf6ZCbHkVdKJU5v+cC18gn0Lfm7LmOF4EMWh94pjFHBKH3nUgn7 T2DnsUko7RYxsbZX6CegDA7k/XVV9TqpJWEy15nsQ2b1NMhBhhhFNlLQcPjiFIxZDMlT +k+xOBzwMlRaoCpm384t57vODbnyqqE0qaZEcJUziSBfe+qB8unrdliLt+WFSWOYPqDK 00PP5tQo3Jd8j5wEDrlbuRVRe2py7ueQgglUv0qPZb4bn3OPQNxBLch+VuXOo24r4YC/ e++HyAzotUJ6Y/fAbVHe+WSHYEBVWrfBkZ2QkrZ6Ai71kXk15XOMuo2gqfdw4gzQtctO y6UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=lIjwgUn5SQ47W7HNyFV/+VXtDaKtuwsuTnoKbPu+W3E=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=etBxSHAlmXqSgx5pPughYbUsEQtLlneUcyKsIzEcUWMJwLwiszjEx4vt4Hdc3VANpA s3aeKFZ1NaVrxSiYKKMtaVscQqh+ejIdVttIAJdGUFJEZRLL4mh8OyWGyV6DnUNELGCy wIDVh3cwiLtyVJDuTCvmdGloA55McrIoss/sO289bcHpHtVvmLPy2fF3T3U6DbvuHb5C 32MLnli74a+YELHEb4FABz9GT9D7y2jSJaCtyy8R4fnFaIq1t7/tK/hC3xZxVg5C6xQv mwwY+FGGVDstD9mq2xc4h6dTZtZIrK8LemgngdcttdB9UXq+RP5cvutpwDcGG/ZBCbAp sn5w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b="Rxictfg/"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 38308e7fff4ca-2f75c08731asi12124821fa.400.2024.09.08.18.03.04; Sun, 08 Sep 2024 18:03: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=@gmail.com header.s=20230601 header.b="Rxictfg/"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 043E968DE44; Mon, 9 Sep 2024 03:56:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 77D8F68DD66 for ; Mon, 9 Sep 2024 03:55:47 +0300 (EEST) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-42cb57f8b41so8009065e9.0 for ; Sun, 08 Sep 2024 17:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843347; x=1726448147; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=pb01r82aJezxY31Vgl+JrxGwPokJSD8/cWLmtx4gM5M=; b=Rxictfg/h8x+WY/OvIKZUV/+oHKGCPTCmTrE7O8piUJZH6L6KwDS1Q8q9cjjxQ8/Tf um85+Nru+WxknPX98k64qdDfzY7oyNjtJySa19d0csCfErE8W5tulG5Dr8JViSbohdLL hNageQC6kNWS/WFN9cu7ecLvmAL0CQCqkQpoH76JwvoKgO6FuALlH/I/VquYfs/A8wkO DhTYnV7Ace/QU/PYzAvCDdGpMNhJq8JQN2enfU7EnLP7G9nadWdLWX8jAlVvf5RLvZQb /sboQozlsx6rok8BD3AA5VZxTrJAq9Cl+X9rhbXavxi3HppEcg/gnAKRG1Mc3yglD8Tc +sGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843347; x=1726448147; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=pb01r82aJezxY31Vgl+JrxGwPokJSD8/cWLmtx4gM5M=; b=vgZrFAVfO3wCV27v06TfkpaQkh+DBhCodynEfLUx3FlHuzzztRd+IU2aEm8e2eDkRA 4rA/Sl8hqAP3Ihgc2zhZXzS0eTHRn7awmEaDgFDofo7m0Pkc1S6xqHblER/FvbdLPsyS Wp5CfFJDBWZt+iPBWfsPzdp9hj+4a1tJ7HSFm/6DrW0Jwn3ERZ+QTag/pLL0PAFg0wyu KStFuoKDDnEueSQuB9uXgsQ1kfTv5YU//cbgHLUyNxH1h2XfiHliYdcHoYPtEIFigdsN R2kJ2T2yvie9ekCxrT72+EA8Uf1CG9ZzXkcx0/wPgWF2so0gk3Rmy2+aNnacStOv2mKv qKxQ== X-Gm-Message-State: AOJu0YyJ7aw3nqLuPxT6p/QbXJBLIEELtRjeVXeETXUGn9cCYo0FbRfE 7YJX8R/+84z/hdCaVl09Q29sJjVDi1hDMC132MOh38v0zC0FaT0129q5LA== X-Received: by 2002:a5d:5cc5:0:b0:374:bcdc:6257 with SMTP id ffacd0b85a97d-37892466eecmr3964218f8f.54.1725843346804; Sun, 08 Sep 2024 17:55:46 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:46 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 01:50:35 +0200 Subject: [FFmpeg-devel] [PATCH 50/60] avformat/rawdec: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: tzN6xuNIvW9i --- libavformat/rawdec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c index d0c829dc42..c7c18f9aac 100644 --- a/libavformat/rawdec.c +++ b/libavformat/rawdec.c @@ -161,12 +161,11 @@ const FFInputFormat ff_data_demuxer = { #if CONFIG_MJPEG_DEMUXER static int mjpeg_probe(const AVProbeData *p) { - int i; int state = -1; int nb_invalid = 0; int nb_frames = 0; - for (i = 0; i < p->buf_size - 1; i++) { + for (int i = 0; i < p->buf_size - 1; i++) { int c; if (p->buf[i] != 0xFF) continue; @@ -211,9 +210,8 @@ static int mjpeg_probe(const AVProbeData *p) if (nb_invalid*4 + 1 < nb_frames) { static const char ct_jpeg[] = "\r\nContent-Type: image/jpeg\r\n"; - int i; - for (i=0; ibuf_size - (int)sizeof(ct_jpeg), 100); i++) + for (int i = 0; i < FFMIN(p->buf_size - (int)sizeof(ct_jpeg), 100); i++) if (!memcmp(p->buf + i, ct_jpeg, sizeof(ct_jpeg) - 1)) return AVPROBE_SCORE_EXTENSION; From patchwork Sun Sep 8 23:55:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51459 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1449671vqu; Sun, 8 Sep 2024 23:54:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUFsskMdMGp4OV10dF7V2muPdtOhbstFjJkDijndxyOHCgdptwxdqXpJ1gFW01Ss8Q6EEAYF/6/OXKfqtWC3EaV@gmail.com X-Google-Smtp-Source: AGHT+IE1r02qfBQl+O9r4bDJdbGVUE72RAo4rfxnFTAcjOTQy4tq092L6UYcxdoS26OP8BzFE5T4 X-Received: by 2002:a17:906:f589:b0:a8d:141a:87cb with SMTP id a640c23a62f3a-a8d141a87f2mr742973666b.18.1725864858108; Sun, 08 Sep 2024 23:54:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725864858; cv=none; d=google.com; s=arc-20240605; b=L5ye7ViyQO9Sbl4FWH6L/IF9AF2iSrieSOl+l8G3OtGzxk78+Rm6c6FSfpm3SLpz3l CjVlyZwHRb10qVSSYa7IyOAkg0F++jBB4TJCh2wR9/4lWCoQ+Rs9lr/JqnJwxXPX44t+ 9kA+umv2xMN9a1P6EinFoZH5qW111ARwQe7HalgulQbcG6Mbe+2P4Y+9gE6TOZPYmfxt dmRdPhfYl2scAMk1OVzewgIAowr9KZvzJo6GWVcAsCvyishfmjp93u+VDpfKTge4hX8Z 9NSdAKZ/um3utyZHQkKIH5tXFQL/VBMxN1L2VdCgD773EGC5warvIqefLrZ0hvMBkXCc 1mlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=sfe5N90pVJ/t0kUmgh1wUMib0zPqiH9dhamLf9qKZ3M=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=buMu+MPdwQvcl2WXUJYsjorSBAYq0psrknR4N9Xblna8fpc6XiYynW2fNObeYEU+06 Y7i41ugOAMNO1M0OVtjpWJZ6m76BUQOt4SHE6gpan8cVFp4XCxP3q9c+XLuh4/va7LZ+ HgOzq1Yq/ocdt0A2lsP6ZebzaFJ9Eswe4szixaHfDnIXWBShQ6FBHgh4AOPn1ktOULkq /bWEmKnjo0kYpBaFT5Camgt1wvf1QVx15cNytWKmHJIZSwOxojLVKVYmRNA6lqzjvApL nLo817M8S8bX6Bff2OXXiHBK3bLKtQCpqGio+6rKWqq1+PvRGM2Mwb9z7q+ID5rh1CiF 6M7g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=HMrPe1l0; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25856c22si323849666b.30.2024.09.08.23.54.17; Sun, 08 Sep 2024 23:54:18 -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=@gmail.com header.s=20230601 header.b=HMrPe1l0; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F37F168DE4D; Mon, 9 Sep 2024 03:56:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3492568DC60 for ; Mon, 9 Sep 2024 03:55:48 +0300 (EEST) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-42ca6ba750eso12305835e9.0 for ; Sun, 08 Sep 2024 17:55:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843347; x=1726448147; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=ixAJ5mRMuz456BqjamRc0//24qp+IralyFb8syhi0L0=; b=HMrPe1l0YliJconyFKnZ3x0+heJ9/muZBOlkXP+o/UoBh+NwviurYKrcjMwtlH/fn6 sc9wwoCsCPbCslqi6lK36WLVqp8NqoY7T9CTLEv9SEIDkf1VAHQKBixjSNMVa7j/3uXN qk102iw9AVFC4Pn07CHjaw1Oc9wIB7QoU7yjt4ip1wHCmKpPKnhbsHcH0sgI3goi5zc1 nNJVZcHscIPrOaSgV6W4IxweClcS2NnADDKT4zVyRmCf/xIaxdSPTN08sf8b8dGJS+Wb IwxkUbOZfpbnufb5YCBZGn6oe28qsUC3EPMkQajKxQAAyAWXj1So2ENERKtVhus6FXIa cTYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843347; x=1726448147; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ixAJ5mRMuz456BqjamRc0//24qp+IralyFb8syhi0L0=; b=h7+Bo/1XMcScwA3TXcK9sGPBu5l8YN7x9bbQomLj0ikzoxsHDrmKRFVNVGwEvWZDEW RukQjfQ7NfXUFSN2yvEayZamPchDbfjCBBCLmkhOwo77M8BFIzbjySbGa7ReCu0yIJwi e7WVq0kXoiG3YyclsX4gKwrvTfexEFBIcvjkyyXGZ8cu/EVIAv6oyHh2iDob1gRW6qlm dSspn0TcRE8w1ELkCTW6vGeZJqL7k7gFoB1qcFHSJKQUC4DpQlLGE/SubJ1OOogJecwD 0vEgmTUL6Et4YrWW/cPViaeOtrvoJ/azA8uT/N18NLEFd6rjGWKoUnjWFUOyuvhZPpvD jHIQ== X-Gm-Message-State: AOJu0Yw/LwkW22x6FiaQ3ko3XFniZtyvY2AojNLw8mwvu8h/g8EXbyxE TO1RlhMHY2b8nb2wNvmDF/RMiySm+wOwBqx4d1jUQqDSN/5rRPhTByTjMg== X-Received: by 2002:a05:600c:1d19:b0:42c:b991:98bc with SMTP id 5b1f17b1804b1-42cb9919abbmr1159405e9.0.1725843347501; Sun, 08 Sep 2024 17:55:47 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:47 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 01:55:56 +0200 Subject: [FFmpeg-devel] [PATCH 51/60] avformat/mxfdec: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: VvmNjpX8yGIv --- libavformat/mxfdec.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index ac63c0d5ad..eb7d301444 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -871,16 +871,16 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size * 2011_DCPTEST_24FPS.V.mxf - two ECs, OP1a * abcdefghiv016f56415e.mxf - zero ECs, OPAtom, output by Avid AirSpeed */ if (nb_essence_containers != 1) { - MXFOP op = nb_essence_containers ? OP1a : OPAtom; + MXFOP mxfop = nb_essence_containers ? OP1a : OPAtom; /* only nag once */ if (!mxf->op) av_log(mxf->fc, AV_LOG_WARNING, "\"OPAtom\" with %"PRIu32" ECs - assuming %s\n", nb_essence_containers, - op == OP1a ? "OP1a" : "OPAtom"); + mxfop == OP1a ? "OP1a" : "OPAtom"); - mxf->op = op; + mxf->op = mxfop; } else mxf->op = OPAtom; } else { @@ -2574,7 +2574,7 @@ static int parse_mca_labels(MXFContext *mxf, MXFTrack *source_track, MXFDescript } if (language && !ambigous_language) { - int ret = set_language(mxf->fc, language, &st->metadata); + ret = set_language(mxf->fc, language, &st->metadata); if (ret < 0) return ret; } @@ -2601,10 +2601,10 @@ static int parse_mca_labels(MXFContext *mxf, MXFTrack *source_track, MXFDescript static int mxf_parse_structural_metadata(MXFContext *mxf) { MXFPackage *material_package = NULL; - int i, j, k, ret; + int k, ret; /* TODO: handle multiple material packages (OP3x) */ - for (i = 0; i < mxf->packages_count; i++) { + for (int i = 0; i < mxf->packages_count; i++) { material_package = mxf_resolve_strong_ref(mxf, &mxf->packages_refs[i], MaterialPackage); if (material_package) break; } @@ -2618,7 +2618,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) av_dict_set(&mxf->fc->metadata, "material_package_name", material_package->name, 0); mxf_parse_package_comments(mxf, &mxf->fc->metadata, material_package); - for (i = 0; i < material_package->tracks_count; i++) { + for (int i = 0; i < material_package->tracks_count; i++) { MXFPackage *source_package = NULL; MXFTrack *material_track = NULL; MXFTrack *source_track = NULL; @@ -2653,7 +2653,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) continue; } - for (j = 0; j < material_track->sequence->structural_components_count; j++) { + for (int j = 0; j < material_track->sequence->structural_components_count; j++) { component = mxf_resolve_strong_ref(mxf, &material_track->sequence->structural_components_refs[j], TimecodeComponent); if (!component) continue; @@ -2671,7 +2671,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) av_log(mxf->fc, AV_LOG_WARNING, "material track %d: has %d components\n", material_track->track_id, material_track->sequence->structural_components_count); - for (j = 0; j < material_track->sequence->structural_components_count; j++) { + for (int j = 0; j < material_track->sequence->structural_components_count; j++) { component = mxf_resolve_sourceclip(mxf, &material_track->sequence->structural_components_refs[j]); if (!component) continue; From patchwork Mon Sep 9 00:04:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51418 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1369576vqu; Sun, 8 Sep 2024 18:39:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWfFSVSD+JKdd43oWUda+JW3PoRf/E0x0B5DZgzshKSlzizu5UuXj1A9eHsiyZugicPSPHIz4iahgVhBMXmOuf0@gmail.com X-Google-Smtp-Source: AGHT+IGmHE+5oHO9ouQJQGiuUfhLdbqSN/spcZAFNby/yRYcDjKRmC9SCjSR2F41Cy7brznQJzdk X-Received: by 2002:a17:906:599c:b0:a7a:b895:6571 with SMTP id a640c23a62f3a-a8a8892145cmr270179666b.9.1725845954655; Sun, 08 Sep 2024 18:39:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725845954; cv=none; d=google.com; s=arc-20240605; b=lRtvi70p2RaqHLdrzUgdqdApkqwSPJ1J9AYsbJ+VjduF//+/bzh914K1jKNsYUHcJN 9F6zL1uC8CFb25UapWztoNYw4PsdqaqNaU927EJa2cLPsNIcuxZ7Fe/RV8rZxEZaDxva ahOis0RCmxMOkExnulYHBmLX4h/V7uTN9ERAgpHsnr8E5jYvBqrrjPA+cuXT054e6o+m MEiNS1ImLrxhOYRGSF1tf96MZmcHNFrj+NFuLDAYdifLa/EGTOpyPWVxrZc5RfmD0yFK umGzQI8DWfwbJuqzAeDY3L2U4vfCB0N5dnxHG5XIaQMmQtH87UbbJr5d4loMyvrEGhWm 2qfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=9mbbDvB8bLGqb6uI9cIuUkxb/FNQMoVGYwvGzmUS5Qs=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=el4S4YbkW/RWvcy/lNOvvVEnwEunrk7o5bIEnrMM4dJVQ2TW1ODeHWIzxx+lz8yIOU yim1dFJso+OVPmZ/kocOnkKCUau+jzX8CidPTWAOwiZ4UyNuUv0plD4O2cck5IovCFo1 /IGzJDi2MyAVuOeJMUyy9+IKhDHmpr1vgy29xzhyOW3HH4fmrSWIIN1XqPcN0FMptRcn kkReKkH72lcAVoRU35KD7reuZvVNd4DcX4c0Z3P6JEnT1YRj65XNFlfHlOa8RYBdxqXL fX1BOqytAjTZulQD6PddASjPG2tymlc4EVKyK9Qk0St8zvhUFiLDFdjQxuwvN4xPwYPb tJ5g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=HFd36cj1; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25c60c51si300003766b.446.2024.09.08.18.39.14; Sun, 08 Sep 2024 18:39:14 -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=@gmail.com header.s=20230601 header.b=HFd36cj1; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0E23568DE53; Mon, 9 Sep 2024 03:56:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0E72468DD77 for ; Mon, 9 Sep 2024 03:55:48 +0300 (EEST) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-374c962e5adso2042365f8f.1 for ; Sun, 08 Sep 2024 17:55:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843348; x=1726448148; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=suTqtxGEvsHNm8sVv5oAlkpwA0Wp/HGvRKGUs7mZbdk=; b=HFd36cj1TNDD0/a/9jh4IkrP9dan5KDiCfZY+0rmzMdUXaIwvAbxkMoDiUju/CgeUh kfdPCennMRBWmUgww9rVQE5GL/6ZaX+KYEK9lLUAzaZ98ImtfXhtiUR9M84sMTJ5Q6o/ vvCsV4NHus/aW6IuJ6WW7YmlcUzq1b/N5Rm86V0l1GtQR0ZbLjVaU1YXYW01U3oTxgwE Ejht9IHLtGkj044Kd4pI3C1dlN6pXea3TqcyejDfLLeJyWxGGRpFBT64GzImXeFenyIV zDisibM1nYKp8iYL1XMO79EqntwCICAs1Uu/U3FEmpelhMHuubl/igMZ01PZNYTUSwGq YR7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843348; x=1726448148; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=suTqtxGEvsHNm8sVv5oAlkpwA0Wp/HGvRKGUs7mZbdk=; b=QkTk20/7w1VSBBzxX6NCFrV/i+H6m/B769FRnto/gE1k6BF0UNRp3ZIlz98kStOq4x Bs/nOxXFjAE2SjgwiOA+MwkrbRBF/ei4m8rNl1eiGbx7OUcURS/OUYkW8VZLFOYS/WKu nXy2uUzFaZxGWT+D72c7dZ/NQXUuEyuGYr0Kmv1/Dv/6tV+pmjF+ITAN7fyyS/gtnwnU 7ismndlV0x5TiCRh0Jj3Ia0vUI3iWGXF48pNMXz/QDAoXFoHkPy96Q+IX6EtG4kieUhU DgeO3iCZ9XTuzqh++UKKbe/12gbDmU0/hG3PHGTMxJ6PKVq0l6OsHBYw/UkJnOgT0ZJL vKxQ== X-Gm-Message-State: AOJu0Yzk/NeBXbqtXt+fd0TX1X2oL4o6S/Uijrs1BanmbkoKtJyV3DT6 a8PHkHxnA+vd3CR6HLkb2pzYpKu2/JDyKujZrNSRyQKOl2Lc8HUZpLOjdg== X-Received: by 2002:a5d:4a90:0:b0:376:e2f4:5414 with SMTP id ffacd0b85a97d-377998aaf1bmr9018595f8f.5.1725843348370; Sun, 08 Sep 2024 17:55:48 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:47 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 02:04:18 +0200 Subject: [FFmpeg-devel] [PATCH 52/60] avformat/mxfdec: narrow variable scopes 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ThihMRjkHtgl --- libavformat/mxfdec.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index eb7d301444..8a83bdfa04 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -482,9 +482,7 @@ static int klv_read_packet(MXFContext *mxf, KLVPacket *klv, AVIOContext *pb) static int mxf_get_stream_index(AVFormatContext *s, KLVPacket *klv, int body_sid) { - int i; - - for (i = 0; i < s->nb_streams; i++) { + for (int i = 0; i < s->nb_streams; i++) { MXFTrack *track = s->streams[i]->priv_data; /* SMPTE 379M 7.3 */ if (track && (!body_sid || !track->body_sid || track->body_sid == body_sid) && !memcmp(klv->key + sizeof(mxf_essence_element_key), track->track_number, sizeof(track->track_number))) @@ -523,12 +521,12 @@ static int mxf_get_eia608_packet(AVFormatContext *s, AVStream *st, AVPacket *pkt int cdp_identifier, cdp_length, cdp_footer_id, ccdata_id, cc_count; int line_num, sample_coding, sample_count; int did, sdid, data_length; - int i, ret; + int ret; if (count > 1) av_log(s, AV_LOG_WARNING, "unsupported multiple ANC packets (%d) per KLV packet\n", count); - for (i = 0; i < count; i++) { + for (int i = 0; i < count; i++) { if (length < 6) { av_log(s, AV_LOG_ERROR, "error reading s436m packet %"PRId64"\n", length); return AVERROR_INVALIDDATA; @@ -597,7 +595,6 @@ static int mxf_get_d10_aes3_packet(AVIOContext *pb, AVStream *st, AVPacket *pkt, { const uint8_t *buf_ptr, *end_ptr; uint8_t *data_ptr; - int i; if (length > 61444) /* worst case PAL 1920 samples 8 channels */ return AVERROR_INVALIDDATA; @@ -612,7 +609,7 @@ static int mxf_get_d10_aes3_packet(AVIOContext *pb, AVStream *st, AVPacket *pkt, return AVERROR_INVALIDDATA; for (; end_ptr - buf_ptr >= st->codecpar->ch_layout.nb_channels * 4; ) { - for (i = 0; i < st->codecpar->ch_layout.nb_channels; i++) { + for (int i = 0; i < st->codecpar->ch_layout.nb_channels; i++) { uint32_t sample = bytestream_get_le32(&buf_ptr); if (st->codecpar->bits_per_coded_sample == 24) bytestream_put_le24(&data_ptr, (sample >> 4) & 0xffffff); @@ -2068,7 +2065,7 @@ static int mxf_compute_ptses_fake_index(MXFContext *mxf, MXFIndexTable *index_ta */ static int mxf_compute_index_tables(MXFContext *mxf) { - int i, j, k, ret, nb_sorted_segments; + int ret, nb_sorted_segments; MXFIndexTableSegment **sorted_segments = NULL; if ((ret = mxf_get_sorted_table_segments(mxf, &nb_sorted_segments, &sorted_segments)) || @@ -2078,7 +2075,7 @@ static int mxf_compute_index_tables(MXFContext *mxf) } /* sanity check and count unique BodySIDs/IndexSIDs */ - for (i = 0; i < nb_sorted_segments; i++) { + for (int i = 0; i < nb_sorted_segments; i++) { if (i == 0 || sorted_segments[i-1]->index_sid != sorted_segments[i]->index_sid) mxf->nb_index_tables++; else if (sorted_segments[i-1]->body_sid != sorted_segments[i]->body_sid) { @@ -2097,7 +2094,7 @@ static int mxf_compute_index_tables(MXFContext *mxf) } /* distribute sorted segments to index tables */ - for (i = j = 0; i < nb_sorted_segments; i++) { + for (int i = 0, j = 0; i < nb_sorted_segments; i++) { if (i != 0 && sorted_segments[i-1]->index_sid != sorted_segments[i]->index_sid) { /* next IndexSID */ j++; @@ -2106,7 +2103,7 @@ static int mxf_compute_index_tables(MXFContext *mxf) mxf->index_tables[j].nb_segments++; } - for (i = j = 0; j < mxf->nb_index_tables; i += mxf->index_tables[j++].nb_segments) { + for (int i = 0, j = 0; j < mxf->nb_index_tables; i += mxf->index_tables[j++].nb_segments) { MXFIndexTable *t = &mxf->index_tables[j]; MXFTrack *mxf_track = NULL; @@ -2129,7 +2126,7 @@ static int mxf_compute_index_tables(MXFContext *mxf) if ((ret = mxf_compute_ptses_fake_index(mxf, t)) < 0) goto finish_decoding_index; - for (k = 0; k < mxf->fc->nb_streams; k++) { + for (int k = 0; k < mxf->fc->nb_streams; k++) { MXFTrack *track = mxf->fc->streams[k]->priv_data; if (track && track->index_sid == t->index_sid) { mxf_track = track; @@ -2138,7 +2135,7 @@ static int mxf_compute_index_tables(MXFContext *mxf) } /* fix zero IndexDurations */ - for (k = 0; k < t->nb_segments; k++) { + for (int k = 0; k < t->nb_segments; k++) { if (!t->segments[k]->index_edit_rate.num || !t->segments[k]->index_edit_rate.den) { av_log(mxf->fc, AV_LOG_WARNING, "IndexSID %i segment %i has invalid IndexEditRate\n", t->index_sid, k); @@ -4087,17 +4084,16 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt) static int mxf_read_close(AVFormatContext *s) { MXFContext *mxf = s->priv_data; - int i; av_freep(&mxf->packages_refs); av_freep(&mxf->essence_container_data_refs); - for (i = 0; i < s->nb_streams; i++) + for (int i = 0; i < s->nb_streams; i++) s->streams[i]->priv_data = NULL; for (int type = 0; type < FF_ARRAY_ELEMS(mxf->metadata_set_groups); type++) { MXFMetadataSetGroup *mg = &mxf->metadata_set_groups[type]; - for (i = 0; i < mg->metadata_sets_count; i++) + for (int i = 0; i < mg->metadata_sets_count; i++) mxf_free_metadataset(mg->metadata_sets + i, type); mg->metadata_sets_count = 0; av_freep(&mg->metadata_sets); @@ -4107,7 +4103,7 @@ static int mxf_read_close(AVFormatContext *s) av_freep(&mxf->local_tags); if (mxf->index_tables) { - for (i = 0; i < mxf->nb_index_tables; i++) { + for (int i = 0; i < mxf->nb_index_tables; i++) { av_freep(&mxf->index_tables[i].segments); av_freep(&mxf->index_tables[i].ptses); av_freep(&mxf->index_tables[i].fake_index); @@ -4152,7 +4148,7 @@ static int mxf_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti int64_t seconds; MXFContext* mxf = s->priv_data; int64_t seekpos; - int i, ret; + int ret; MXFIndexTable *t; MXFTrack *source_track = st->priv_data; @@ -4182,6 +4178,7 @@ static int mxf_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti t = &mxf->index_tables[0]; if (t->index_sid != source_track->index_sid) { + int i; /* If the first index table does not belong to the stream, then find a stream which does belong to the index table */ for (i = 0; i < s->nb_streams; i++) { MXFTrack *new_source_track = s->streams[i]->priv_data; @@ -4243,7 +4240,7 @@ static int mxf_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti } // Update all tracks sample count - for (i = 0; i < s->nb_streams; i++) { + for (int i = 0; i < s->nb_streams; i++) { AVStream *cur_st = s->streams[i]; MXFTrack *cur_track = cur_st->priv_data; if (cur_track) { From patchwork Mon Sep 9 00:08:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51419 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1369569vqu; Sun, 8 Sep 2024 18:39:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXpDhaSA3Yc9QKyc37vUfvOZqxb39nZXzJU3yfoym6XliT9T3fy+kUuMS0GmhZqkw8HVx9BKENo/FVVnAbwF3Mt@gmail.com X-Google-Smtp-Source: AGHT+IEIhBOBowv7NwOUo8IiQBWp0yXa5suoiLju8UDirUXu6ZE1EW2wl3szmyJg+RxZYHSuAylM X-Received: by 2002:a2e:4601:0:b0:2f7:4f93:ef8 with SMTP id 38308e7fff4ca-2f751eb351emr53875111fa.4.1725845953683; Sun, 08 Sep 2024 18:39:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725845953; cv=none; d=google.com; s=arc-20240605; b=UGp9IV1hFtJMo2KimOYQDwvCsTi2JuKpSOszP8ynWTmdSkFv7XYvZMJ20DPCRi54YU eiAEm16Sesl6EYh/iiQ0GKZobx/qdrWincn86AALAO3BhbfH921hxELhD/QnANk+yL3U CSohmeOwNnj7qVI/NCFgUSc9SbYAqTxxKhmSnmLO9XJpOW+IeT+3FrABOOImtlhiCoAx QePhI5EYkFJmgs3Pd00u4QQwxkfHBMxYIvLs7V2QRPGJadDsT8IEoowfWyT4d0eMR2kD DODlw2fqGEc8FMLRB4rLZjjCw/ILQFImkNzO1t6Et1WaL+vXBDuQiKs7TzkkGK86W1FC 4M7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=ISJqkTxUGIiO8ZUZ+aA1vkEYCE5REoE38/twKZHJjVk=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=YkGs3N9EXV9klutNx0iQ1+OYxqH4zq/SekDBoYhset10GV4i4Kt2AnVDrwF4pllb1t qqF3UBGmCGENoXpYN9IxI5RhNAldBQ8csbvl8F45/Yqh4htCJCOd1+iYQi4Ia/gOCsWQ BHcrxS+vrl4SoKY4wZRh0GwY5HCQWCXic2aLTXH8kzGlElpgafs+WZJ8z4nNlG9ozunC ja0FJ+8XPZyFd9dQL/Fn8Gmi+97mxZRZFMMEB/Nh/ESQqbFxs7WXiI/Zroc06ElaXSR4 BUjMSWiReOmrbk3o3rPGz6j6RCTqnqgbhkRRQACW7mciQsYHwxHHjb0BXJgcua3VmsCd 3Vrw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=HOqixM5F; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5c3ebda968asi2911158a12.528.2024.09.08.18.39.13; Sun, 08 Sep 2024 18:39:13 -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=@gmail.com header.s=20230601 header.b=HOqixM5F; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0AF7968DE59; Mon, 9 Sep 2024 03:56:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CF78D68DD84 for ; Mon, 9 Sep 2024 03:55:49 +0300 (EEST) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-42bbe908380so33656335e9.2 for ; Sun, 08 Sep 2024 17:55:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843349; x=1726448149; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=CFjM0saKNXMh8IRajT2MNwQiOw+QJ7pZ98ETVECv8mg=; b=HOqixM5FCS2NRcib+h4hpeUCQvB+H8goDqO8wswU9UUG+xOvX/jnIl9FpM87fVk4nc pCBadvVk/sMxS9eJzv71jm9vloa2aAPITXPXD2HacyXxGbA6S9ydPJluW77UTf9GySwE o7uPWhjw9XgUSWlF92Ack41CSLR1LWSgm5spxThdpTJN8oIJR2UmAlvqo4pyT/GoDL8f 7X93WOq9UUbF+EOl+Hwaw7dKnkpqz2w1MntFCkT5ASY+oa3+Cs0w7t7IIi6mbxAXWIWc aBX+kdtQ8dlnDRiwbN8VQ3eVzwam6rnEBtH+o1hW8wwu3smLXZt3FJZZnXIGA8U89E/f 6LSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843349; x=1726448149; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=CFjM0saKNXMh8IRajT2MNwQiOw+QJ7pZ98ETVECv8mg=; b=kItn+D9wV5uMdsPRfdNnRKEB0meg11qFcnI+5Qo4UVEIKLzSjWeyk+zwy/Dnw+nzvX 3fEk60myUyhac5WQgITWO+wbhNxID05E/8QxrftyeHS4pRj6i/3fEScJHvKpEgcXPsj9 zmG/u97Pee+zJBNIK+fLIOCmTawkJ5u7RgB8hc3Aou/b36E6dK8y1BaGA2CYGOBwmgzZ ia5xh/ft58KjscmdhAYSuakXOotopkmzzS/sjfC4Jxvidw540JnTmMQuwAdatcIOGZ9D 7Dr+Y3Ee/ZcMpwVFpscaIcEBsyAs8ijrCLBv8X7YBXkw02LWeshMjqjedFEN3SrpFzHL pS8g== X-Gm-Message-State: AOJu0YwyOYEv7CVgrOXnHvykK7nbEY+V61I1AKy4PJ8aQPmsyvLj423d c8kgv106BUQ9pL2Ei+bOUu81pl/xmIEIkkD8tJYp2U02aSKJMO1NVAhL0A== X-Received: by 2002:a05:600c:3b11:b0:42c:b197:96d8 with SMTP id 5b1f17b1804b1-42cb1979a72mr27825835e9.5.1725843349108; Sun, 08 Sep 2024 17:55:49 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.48 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:48 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 02:08:55 +0200 Subject: [FFmpeg-devel] [PATCH 53/60] avformat/nsvdec: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ZhYai2dkcqWW --- libavformat/nsvdec.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c index dd01765d7d..a55da05226 100644 --- a/libavformat/nsvdec.c +++ b/libavformat/nsvdec.c @@ -380,7 +380,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s) uint32_t vtag, atag; uint16_t vwidth, vheight; AVRational framerate; - int i; + int nsv_rate; AVStream *st; NSVStream *nst; @@ -388,25 +388,25 @@ static int nsv_parse_NSVs_header(AVFormatContext *s) atag = avio_rl32(pb); vwidth = avio_rl16(pb); vheight = avio_rl16(pb); - i = avio_r8(pb); + nsv_rate = avio_r8(pb); - av_log(s, AV_LOG_TRACE, "NSV NSVs framerate code %2x\n", i); - if(i&0x80) { /* odd way of giving native framerates from docs */ - int t=(i & 0x7F)>>2; - if(t<16) framerate = (AVRational){1, t+1}; - else framerate = (AVRational){t-15, 1}; + av_log(s, AV_LOG_TRACE, "NSV NSVs framerate code %2x\n", nsv_rate); + if (nsv_rate & 0x80) { /* odd way of giving native framerates from docs */ + int t = (nsv_rate & 0x7F)>>2; + if (t<16) framerate = (AVRational){1, t+1}; + else framerate = (AVRational){t-15, 1}; - if(i&1){ + if (nsv_rate & 1) { framerate.num *= 1000; framerate.den *= 1001; } - if((i&3)==3) framerate.num *= 24; - else if((i&3)==2) framerate.num *= 25; - else framerate.num *= 30; + if ((nsv_rate & 3) == 3) framerate.num *= 24; + else if ((nsv_rate & 3) == 2) framerate.num *= 25; + else framerate.num *= 30; } else - framerate= (AVRational){i, 1}; + framerate= (AVRational){nsv_rate, 1}; nsv->avsync = avio_rl16(pb); nsv->framerate = framerate; @@ -420,7 +420,6 @@ static int nsv_parse_NSVs_header(AVFormatContext *s) nsv->vwidth = vwidth; nsv->vheight = vwidth; if (vtag != T_NONE) { - int i; st = avformat_new_stream(s, NULL); if (!st) goto fail; @@ -441,7 +440,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s) st->start_time = 0; st->duration = av_rescale(nsv->duration, framerate.num, 1000*framerate.den); - for(i=0;iindex_entries;i++) { + for(int i = 0; i < nsv->index_entries; i++) { if(nsv->nsvs_timestamps) { av_add_index_entry(st, nsv->nsvs_file_offset[i], nsv->nsvs_timestamps[i], 0, 0, AVINDEX_KEYFRAME); From patchwork Mon Sep 9 00:23:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51470 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1476576vqu; Mon, 9 Sep 2024 01:04:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXJoWERh0t4/EcdUByl+rdRP2seiynhqLEew5bas0GkOUR17U/Pd+9expbP85lVA5/dp8L/QAgC5oLUNCAZdUtf@gmail.com X-Google-Smtp-Source: AGHT+IFTFYIz7EjgAJIauNE8llPy2Bj5T0dnezhI7EHHxBSlCp7XA1PyEIBhUcAMTZ+8GynsWx04 X-Received: by 2002:a05:6512:118d:b0:52e:ccf5:7c3e with SMTP id 2adb3069b0e04-536588226e8mr3345498e87.7.1725869060994; Mon, 09 Sep 2024 01:04:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725869060; cv=none; d=google.com; s=arc-20240605; b=bCcGXIi5oxHD9dKHlrKEGEG1/5NUF9+7rlO4cLMDLkRexTD0erqUQ1uJnEqBfjTxa/ QFJEvG4BQDbPAdvd57uQ69rxySOQ3tGedPMmPQOCFebzc/hrnaG0SlFr+uuLh6ZMBSN2 gpN5nKyJvBX++NkEyt1Yz6eAIzMdnTloqDN1pNJm+j0NIkrtlaGwyTHresgEOfSMMm7I byo225BJnvv8MEoY8uv22Ei5wfF6fYokKeMk5ZzmnPBU/x+wSN6wrSmj89VgNbC6tV/a 0MfWBnFrDwpxWwawSbah5AppuIh8ckuk7zlMF8XHVIQXPWc4tkercxMzvc0IETbm2m4L 4mSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=ryPPefdiEaYUob3ROrfrWnr2DnleBJ1JwyWcXiK9Hqg=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=Jl9qWOTGMDDjR47YvWs0v71aTKZPareLWbld3oKGWZSGHK10zr+kC0RDg04o3olTF2 nCxRrR5qsCCSp13pUshpyi3dR6Clo6IqOyYw1VbukR7bqN+1zANHkjJ0F77hlt7M/W8+ xSyKqcnG2td6eZlqz1PB/qUEugV8sk1Nr2mCnxN2ekx9gTCRXPpaj7YNlrKCtc8fFHol qkVIeDbE4SojsXlNe4qYdPZ1UaHOSHyCCESWoTiOMob06SeFQqMeuVP1Wr89iA1/cfa1 VrtS/C+1FcIB2aaeiGlhoQO691ionjUE6WM34DXDZXymfESj756FJq3o5N48PKb4cAG5 aKnQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=KYwNi0eZ; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f8c151dsi1490274e87.315.2024.09.09.01.04.19; Mon, 09 Sep 2024 01:04:20 -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=@gmail.com header.s=20230601 header.b=KYwNi0eZ; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0D35368DE63; Mon, 9 Sep 2024 03:56:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AA51168DD85 for ; Mon, 9 Sep 2024 03:55:50 +0300 (EEST) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-428e1915e18so32026265e9.1 for ; Sun, 08 Sep 2024 17:55:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843350; x=1726448150; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=fLTwXfSfusLXQEA1qNcvjQWiuSXkKDc5R3UjoF3lfac=; b=KYwNi0eZ7adJmlnUfEQGVvKCO55bPFMFbCY1gj/TVkVpGuH1JyKHugoXpDvYw2WXyu 2/p3JTcr7ywUIgCVTP0jyI8MjSWuEOt1KYQHejdUxf/Y4NLROWz+4P/QMBTlO2B/Q6Ng 0mWcBudRlRFgJyIf+NXSQ/cbEnZXmCj5o9e5tbJ3QWW/GpddXl7QJLz8R1wbPuLwyAp3 1Vj06WfrOnFO1rBmilsTnqz+0XglMTMVNCy9zoJV4xn/wUiRPHmcnDXhsmwu6cRPGxoY u3RVSArQS/sPyHxulyYoAXzS4ZOiJWnGX/Ma5PnELu77yMgxLzlLujS+7tgVKnMVdUpL orew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843350; x=1726448150; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=fLTwXfSfusLXQEA1qNcvjQWiuSXkKDc5R3UjoF3lfac=; b=Pqfbk3++RjBvVr5u0YB5Wz7RzERxaKSUGomfKnkftuHRL9/QJV0LDnYw0D5tCDFH0B Rqgv/3ri/3KnkKUxgPn1vGADZ3/f/GKmHYQkaTvtx+T6b5y7JMXNziygR6iLuJOprfBI +qc9waKZ3ikS1c8EkLbM9nTq6+yEI3/wvKDujKpSLe3iwxKVyp+MhZJnFTOlpkPxB9fh bJLp4k9zb9FIvHmQ37UAF0/ynG4GM5hiCJYKqUZkfM8Cnj1M6NPldG7SWrhoNq0sFS9Y xDroMbeCLrzlXlxCpr8mICjMUoU7ngAiMh4HkdFeucLcEriBN+UI8ZNlcLGkSrq9+ta0 +VNg== X-Gm-Message-State: AOJu0YyV7e5zJqoAr2aeG5ahKJam817mj1a3535DZLJQwsfnWLV4WFFa NJs/WIPA6sft4ZYFxf1FOnKz+xWToxBWRyLjIkIRPa0QQx1OPIdDPkk5Dg== X-Received: by 2002:a5d:558f:0:b0:36b:bb84:33e2 with SMTP id ffacd0b85a97d-378896a3fb0mr6373008f8f.37.1725843349936; Sun, 08 Sep 2024 17:55:49 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:49 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 02:23:34 +0200 Subject: [FFmpeg-devel] [PATCH 54/60] avformat/matroskadec: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 3DG6nD0NXcRf --- libavformat/matroskadec.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index c8741ff2af..60b20e9658 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1281,8 +1281,8 @@ static int ebml_parse(MatroskaDemuxContext *matroska, MatroskaLevel *level = matroska->num_levels ? &matroska->levels[matroska->num_levels - 1] : NULL; if (!matroska->current_id) { - uint64_t id; - res = ebml_read_num(matroska, pb, 4, &id, 0); + uint64_t tmp_id; + res = ebml_read_num(matroska, pb, 4, &tmp_id, 0); if (res < 0) { if (pb->eof_reached && res == AVERROR_EOF) { if (matroska->is_live) @@ -1301,7 +1301,7 @@ static int ebml_parse(MatroskaDemuxContext *matroska, } return res; } - matroska->current_id = id | 1 << 7 * res; + matroska->current_id = tmp_id | 1 << 7 * res; pos_alt = pos + res; } else { pos_alt = pos; @@ -3039,7 +3039,7 @@ static int mkv_parse_video(MatroskaTrack *track, AVStream *st, if (track->video.stereo_mode < MATROSKA_VIDEO_STEREOMODE_TYPE_NB && track->video.stereo_mode != MATROSKA_VIDEO_STEREOMODE_TYPE_ANAGLYPH_CYAN_RED && track->video.stereo_mode != MATROSKA_VIDEO_STEREOMODE_TYPE_ANAGLYPH_GREEN_MAG) { - int ret = mkv_stereo3d_conv(st, track->video.stereo_mode); + ret = mkv_stereo3d_conv(st, track->video.stereo_mode); if (ret < 0) return ret; } @@ -4683,8 +4683,7 @@ static int webm_dash_manifest_cues(AVFormatContext *s, int64_t init_range) AVBPrint bprint; char *buf; int64_t cues_start = -1, cues_end = -1, before_pos, bandwidth; - int i; - int ret; + int i, ret; // determine cues start and end positions for (i = 0; i < seekhead_list->nb_elem; i++) @@ -4740,7 +4739,7 @@ static int webm_dash_manifest_cues(AVFormatContext *s, int64_t init_range) // Store cue point timestamps as a comma separated list // for checking subsegment alignment in the muxer. av_bprint_init(&bprint, 0, AV_BPRINT_SIZE_UNLIMITED); - for (int i = 0; i < sti->nb_index_entries; i++) + for (i = 0; i < sti->nb_index_entries; i++) av_bprintf(&bprint, "%" PRId64",", sti->index_entries[i].timestamp); if (!av_bprint_is_complete(&bprint)) { av_bprint_finalize(&bprint, NULL); From patchwork Mon Sep 9 00:29:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51433 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1396450vqu; Sun, 8 Sep 2024 20:24:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWEfMnNMpPr41N92DjNg6P9iKANYy7zI4Mi2oFbqCA6gnCAbQbSjXACEyPPefqx3uYz1ATV8FQSx0u0Mb1SF7fZ@gmail.com X-Google-Smtp-Source: AGHT+IH+UO9/xQDUQYb0y5bPnOs4EEtaS5AEBOB26AAyFTL/O1lNa9kQXPwScw6NuhtB6M9xxzCX X-Received: by 2002:a2e:a98b:0:b0:2f4:9fb:5905 with SMTP id 38308e7fff4ca-2f751da74d8mr47446621fa.0.1725852251997; Sun, 08 Sep 2024 20:24:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725852251; cv=none; d=google.com; s=arc-20240605; b=PtqdC8ez3VFiakjo30NK3iuEbTHovv1C0Qn/7nD1l4yHTHluZoBQl/E4atpYtVG8PI DCjUaUE2WVlplkXCaSj+Kc0wIqE+cuZcyi1Uxh7IVYlxhsGABWOarhqNW1ZLI0hFPLP3 iwv/kUqyc1BVFOdObLGE3uuyaxq6vI7TbXSgxi2e/d1asXDH1hy5499SVcfh6dfqWpqO Fudwe23U+DXpXkpI5g61EZLvuK4rNkT8qNSNBy0qw4BUwf4+pJaikx2NBM2pCkaPACPH K3hvD69OjfHj7v/1M++2N94KHrKgIX51igOl6DgJy9WRGnpKBqVdxHkJserQDR/nIMpb lwvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=kwzi64KDcG5BYwX9uaCVeboxRcUTQ1N9OYt/fLYgTaY=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=QiekWNKIYN2BH2hzA/huJFSEDWTx5JoHvw10S9I4c3LMe3OdwnKOnoIxriQaYu6iI7 H+dBQ4OBIK7cCyOAp4+D3+1frkaWzV3pogkeNa/kw1/pHAMmYOAVr7oJM0r5MfD4Vmxe 6ZcF9gKJcd6giA2GypclgtQHy740D5n5NElAxB8YLfyQFxZiMShz95vFx9Pp2Esh/tR0 u0pQHdjdtJd5PpOTpFqLx/m78HGos87Gp/Zbq6sDeL4yjB3qiJeTtEszuqUULY9zvdUj swIFs0R7lUqs1Ax9z4yFS6ULDvejwefQnINwL9hOXEA7zgWqCNKS8Bd/mcwtw+7OKagc BDLA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=C5MplPwu; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 38308e7fff4ca-2f75c0b8ac3si12668681fa.623.2024.09.08.20.24.11; Sun, 08 Sep 2024 20:24:11 -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=@gmail.com header.s=20230601 header.b=C5MplPwu; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 595DD68DE62; Mon, 9 Sep 2024 03:56:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 98F1A68DD8C for ; Mon, 9 Sep 2024 03:55:51 +0300 (EEST) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-374c8cef906so2425075f8f.2 for ; Sun, 08 Sep 2024 17:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843351; x=1726448151; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=mi9aUG/m6vQtkl5O7LjgOm+1Q52qYepRu4QmTGj61KA=; b=C5MplPwusMrya1zgI8teI633FDiNJGuKlmNKdsMlpDXo9GAcG6t0Y2jO9OpMwpbRII Zut9Ky+kiek41yx/9KbPQ7+s5j1tqYNDF5ICYcOllRAhbzrBfkz8HYyycvi4+vKb0a3x GUqcqPnkW6M5x/kgpuAJNkr7gwiSaFnUyHZKCCQQtGR+H3afzJdwcuHP11020xyAmKJO 6aFMHd6coYbyodN9MHiWkzPy3WowKob5UcqpYkwYC+nLjNtwFk95xYRL7r9x8ZK6sYiW iRByCr7NJLQZWArm4uZsXcP9lv9AL4wCmId2f0A/QdwfdyGRtWsJCrIWphaEriME5kkI uFqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843351; x=1726448151; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=mi9aUG/m6vQtkl5O7LjgOm+1Q52qYepRu4QmTGj61KA=; b=cRFjaW0ccS7F8nL8vq6eCbs+rfsNp74T49aFms132U4KscFU0Qo/EcZ8LbiFMyQPrK B9t1+hLTqWKQAoU4YPFt2aTOD4X62WdFAgK/1DsB39wNsJBQiNVT0NHzwKaJgJ43G9t5 lTxrmVPcm/a6hvsONC+as/wb97ArXF/kvpD1O+aBjbkQdC0Vkwhq5xrhkNZTKXRUeLQu AFDCdVhsSA144U8FFYU35FKGrOGowgLN3MOusJWGEJoUrACuLk+FwnzLKoKxI5ukSzK2 ZET/RwwjAc9NWaelfaG/YC5bMal+qbEkmzel8VzLXDn9fGSHgvQXCWpWyrJNknM/gT+P CDRw== X-Gm-Message-State: AOJu0Yxlmn7RfhSE2DSeX6P6GbwDLsgWA15E7RHJjV4HvKXMhIRC1cYz aps7TVnrHDLbCWMoufiJnnge9VYRdo6E1Dpo+eztyxplY1FrIO4TxFqgfQ== X-Received: by 2002:adf:f751:0:b0:374:ba7b:42af with SMTP id ffacd0b85a97d-378895ddb97mr4611608f8f.26.1725843350849; Sun, 08 Sep 2024 17:55:50 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:50 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 02:29:44 +0200 Subject: [FFmpeg-devel] [PATCH 55/60] avformat/img2enc: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: krXvR1cdxhre --- libavformat/img2enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c index 526a11e5ee..ae239d27ea 100644 --- a/libavformat/img2enc.c +++ b/libavformat/img2enc.c @@ -224,7 +224,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) goto fail; for (i = 0; i < nb_renames; i++) { - int ret = ff_rename(img->tmp[i], img->target[i], s); + ret = ff_rename(img->tmp[i], img->target[i], s); if (ret < 0) return ret; } From patchwork Mon Sep 9 00:33:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51460 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1449676vqu; Sun, 8 Sep 2024 23:54:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVev8WyavfEoY4C2fzTHTc40gPTOEg3c/6GRn6OAWnVD7xN0LfQVXNPBuyIoJ+jnz/7E7ZV05ogk5ksqL1spBX+@gmail.com X-Google-Smtp-Source: AGHT+IEjpgFy0aZrF2XHjCrFIyzQA1eRz8L6eh1zMuSccs6TjjHe0TS/rnAzq3iV+isqOimIaVTu X-Received: by 2002:a05:6512:2806:b0:52f:c285:323d with SMTP id 2adb3069b0e04-536587fca25mr3139672e87.5.1725864859103; Sun, 08 Sep 2024 23:54:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725864859; cv=none; d=google.com; s=arc-20240605; b=NVaJ+2bIOq1tFMxttcbUC7OgHNjzsQnj6H12jg49EN0R/2pvJbn4GOg3XC1flEODCX ZzXHg6EOVr3pLaz4V4QcLQvXQBmvorJkhsFqYoC3URIkIZJA/XoUWTdpe0lKrCSR8erh alq4sWjoiC2XSq6hlZR1SthWtEufn7eglGLvMmOlALRSr/OQvOBbNegzrvMDhqsfATx7 FZ56vIj5dLJuVgfToCmVhF0/XpJhon3WHaCzU8V0XSkp8C30lGI23G3scuNxCxZZ138x Wv5QRNe1b2aGouFZxooL3SqnFUOBMoTd23o+vlHoMnLtK0zGgfe7VuhFl3EARLvQ3KyI tSqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=qy7k17PNek1eI7v6GtRAopE0BN99Hk7XcxNznvyMmhE=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=dfOKlUbrTjSpBf0wrXzK2bBFuarR9kIcuk12YD2bkBjMBo+JYYv4lci+itgxvOCi37 5UHInIPP4traTxBgERVnmHQnY6RuiSMCLYJENOTSn9oVXrC+vneXjMH2S7UCQfP67NOo d4fFqynAJdwLKqfWSryktqpjA3GmpiyLjhYSdzEIh6OmQ525S8RxEFsjG++5W/L/sg5J h9vzvd1fw1u9yS2sls7e6cTTeisco7fBn7v1gmMW8bs36rNBab4QbR1jlcPnLjPq33oM 3xAxWA+NOENyIGheBx9U/kEjjBmms49WyjKa+0cFjPs/ZxWvfcb8/cGCUNqZqaTK79ge ILeA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=TIJGkem1; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25cf4a50si348609266b.575.2024.09.08.23.54.18; Sun, 08 Sep 2024 23:54:19 -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=@gmail.com header.s=20230601 header.b=TIJGkem1; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 69C9568DE70; Mon, 9 Sep 2024 03:56:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6939768DD9D for ; Mon, 9 Sep 2024 03:55:52 +0300 (EEST) Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-374c1963cb6so2256971f8f.3 for ; Sun, 08 Sep 2024 17:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843351; x=1726448151; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=uHCaXS43MtwEeVZXu1lVqpKxVIwAz+UGFIJUHkGhJMk=; b=TIJGkem1vTbl8EoXwN2l7XQAjhcHCr04UrPWoA/MYghOHcofa/y+pHdOGj74anDoG2 6jgkwMwqz01AJuJZCcvW4oZs2X6BRrvouxk553pncK255zWVZ4RiuPb1jrJjc3/5jR1G fxJzwpYQBr8dlrcsC5Pai1ViasNLPgYYBqqz/ztdYCBMidXK4LfdhMNMezsypQSlsibW tzDlouS2mBXa/98NNVF9GsoeLcSP9P6fly3ECGgz3//NYxJyJfstTg67cEyAEVlhEEOa Gb4jWL1kY1Ha6YTdFlewOSafRAvmfAibEGzWdFczWY+F0QtOpaiQo4n9ZawqngEf+QRH vq/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843351; x=1726448151; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=uHCaXS43MtwEeVZXu1lVqpKxVIwAz+UGFIJUHkGhJMk=; b=T5COuOMWNjyBymqGWz/lU52fRG4+Gde+TTKBNekswKhEr5nF8FfyK2OrYa/OFSr8xd xmS634JBBHdIi3ZlOj/Dd/cLIQ6NXsRnU+L4aYHVe82uPeON2CxKGJ+FAsS02bXYeOdk wDffBvOrrwRzJEXk6haSLybIPyx5ESLQNGxOalJRGbDSTp+fzS9J0ixsoK9EqxLBrn24 8XdZPFAFiMdmfgAEqyVE1RM7VJW3fmMjpcRPkUuDVD/YRqa8gfX3uUU7qpWfUt1yUR+A Ick8rer9aRo/PVF4gaQARZfMXOul9PuHn9wfEsKmG+1zKn2/eSka5dyue/M1jLXpTEIk i8dg== X-Gm-Message-State: AOJu0YzauCwN7G8zyHfdt/QmnU4kSu3+V3FuPVxWazJ+1cyTKHlqIql2 YwoCDF+ZqruPpsKXn0tYSh5Ou2KgV4ERYoygA4ITwwum5VSXpBqG4GAzuw== X-Received: by 2002:adf:f60a:0:b0:374:ba73:a90b with SMTP id ffacd0b85a97d-378895c256dmr5517217f8f.3.1725843351666; Sun, 08 Sep 2024 17:55:51 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:51 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 02:33:18 +0200 Subject: [FFmpeg-devel] [PATCH 56/60] avformat/http: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 3BR8ZRDfhgo/ --- libavformat/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index ec60bc0b17..22e4126790 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -150,7 +150,7 @@ typedef struct HTTPContext { #define E AV_OPT_FLAG_ENCODING_PARAM #define DEFAULT_USER_AGENT "Lavf/" AV_STRINGIFY(LIBAVFORMAT_VERSION) -static const AVOption options[] = { +static const AVOption http_options[] = { { "seekable", "control seekability of connection", OFFSET(seekable), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, D }, { "chunked_post", "use chunked transfer-encoding for posts", OFFSET(chunked_post), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, E }, { "http_proxy", "set HTTP proxy to tunnel through", OFFSET(http_proxy), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E }, @@ -2048,7 +2048,7 @@ static int http_get_short_seek(URLContext *h) static const AVClass flavor ## _context_class = { \ .class_name = # flavor, \ .item_name = av_default_item_name, \ - .option = options, \ + .option = http_options, \ .version = LIBAVUTIL_VERSION_INT, \ } From patchwork Mon Sep 9 00:38:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51423 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1378692vqu; Sun, 8 Sep 2024 19:14:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWo+A9zawTypNFgI6wJVwcIgrdK2qe9H9T3nVBMQRODC4JnRvHUNjujhM9XS3wkYfu70qnwGX7BZgXvseOclTiU@gmail.com X-Google-Smtp-Source: AGHT+IGeFtS+6u7iz0d0J00ejPxmNVOkPyj/31mSyeL/zawi60nXPNWzZ+U9Yp8iO92/kUi8QZJA X-Received: by 2002:a17:907:7faa:b0:a8d:2624:1a84 with SMTP id a640c23a62f3a-a8d26242585mr195172266b.11.1725848052677; Sun, 08 Sep 2024 19:14:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725848052; cv=none; d=google.com; s=arc-20240605; b=B78YNQmiLc087qdchEYUnoqjmlWHWghDU/k3x3uNQnXCxub4Xj/MdlwUPTh8yjlgWf k6Kak86LpoMF+ME8DygeLiPY0jXHsCg3jTfighwF+EoCr07INEYdzEoF5JcTUe0RePOv 9LapG0aupisJAu+sQTTGPsXS/2gE8B8A+hy5O7lQBo8/CTTe/cUPy+zbIr1AXcjSYcXp sCdgOCk1z4QNEiLxlRz+2L3gofChNIhZbOcEwLl5QyBDbg94wK5we7DP5W30y/peQH4m rKwuNV3AqIKvUFmFwuWTEa78gqfD0S8e3+xiWwR+kr/UtBISn/gav0j5SBgzTFD3N1vn n8bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=olfq669yz+N+z5YYHkdWs5coh4lIaWCmPb/iKsX2JD4=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=lKAEKvb/4tpzslDVVjH3zVTU/xG3ye5f033Y25NT2CILDdbyc93nVvqZh4HCH+REUX dJudgWUUsAile2z5yoIyrpNwJhd+AS3wtldRfMFIxZgAot7fOv7GVIBEdo9pycJ7Q45C LjUsLUAZt422GyS1jZyPqQogQ5Z06hbkMOnw5LfwlSMCLHzVtMSPUczF93jsqm9jqyv6 41PanNi49cqew3XJuPvwMN8FZxVYU4k7PM+X6WfHWrVJI1kMbqq98GCB140VlzqyhQQF IOW65VSRjR3Mkcp0Y0ScrD4lb59pRe0WFwike7PFAXA/mmxr56Wt3EI5PRyyUgRbZFjg /U0Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=KtYMEK65; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25d66081si311545366b.843.2024.09.08.19.14.12; Sun, 08 Sep 2024 19:14:12 -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=@gmail.com header.s=20230601 header.b=KtYMEK65; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5613168DE79; Mon, 9 Sep 2024 03:56:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 564D168DD8D for ; Mon, 9 Sep 2024 03:55:53 +0300 (EEST) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-42bbd16fcf2so34453375e9.2 for ; Sun, 08 Sep 2024 17:55:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843352; x=1726448152; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=Ug5BvGhLdJtGYEd/vjUr+9IHKxR7+jqXme+SLiWx7/A=; b=KtYMEK65e2kO+tLG46p21WDOCzTjIP75AnnbvA6gQpShwLlUhUAjnKJNTxReb5VpHu ZmI9lXOdnXx20ZMTw4rpoF1HxSXkT6UpqTrHRtdRZkwe/oZsyfZHtbHLd49fRVWoAOa3 EYYSkv/+iUeMTCnKQnXeH8oFGldcpXDhiYSj7y/Dsgz3I7jF7am9SVQV/pLMD4xotQDX hu+4SzwVxhrERq2awbVBN26oE2674aDTWFBViv3tK5U/AX5e/jHmk70Wo5AQCQ51XM0T 3o1CIjGtzOeoV7vg0ucy9krsB7sNzYbeLAI1Wh1k6GyWluJv/IoEHp7FOTGOwLFw4kQY TJjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843352; x=1726448152; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Ug5BvGhLdJtGYEd/vjUr+9IHKxR7+jqXme+SLiWx7/A=; b=otebAhJwLShjfoY6Bk4Iw4apAqPvqGw1YIpZf2H2dB4nHJuh4xW4pUX/XmgYOI21mK nJcEd2KWNlyr4DxC5t5Mg/j85MMmAgF6SjrmoofpgOZGaH3EmXZbW2caH7eRhgJ+eILK Z5swIvlWJG9iNa+Aksp3+BFj36Dti1rg3zow6uWHM8EU2EPIBM10PdUfA0lUdONeSMCg 38zZqMZjo/ibZqysRsrp7M7my0LVUB1T+4a/v7CXAFmNNj/+hypcDght2m7nbvM0k+Ll Uighdi63iiUNqN8ALs3hjN1rfCK/v+80AN8PFLnxlBA7hTl7Q3yRZsNBN2STPbPxR0s6 Ej/g== X-Gm-Message-State: AOJu0Yx3ktJ57hIv/hsveqWIMIdMzRY0KGFeA7ltUl/sol2IIP+VrEkO ijjeRZVxKABO+RRMybcgPG+MnUeaPlucWSD/BipIorp8aEeYENqbjFU70g== X-Received: by 2002:a05:600c:4f88:b0:426:62c5:4741 with SMTP id 5b1f17b1804b1-42cae70a06bmr37401225e9.2.1725843352677; Sun, 08 Sep 2024 17:55:52 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.52 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:52 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 02:38:21 +0200 Subject: [FFmpeg-devel] [PATCH 57/60] avformat/bonk: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: zRAlbJ/OjuUU --- libavformat/bonk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/bonk.c b/libavformat/bonk.c index 44de8e2087..d5eacfdc91 100644 --- a/libavformat/bonk.c +++ b/libavformat/bonk.c @@ -63,7 +63,7 @@ static int bonk_read_header(AVFormatContext *s) const int b = avio_r8(s->pb); if (!b) { uint32_t t; - int ret = ffio_ensure_seekback(s->pb, 3); + ret = ffio_ensure_seekback(s->pb, 3); if (ret < 0) return ret; From patchwork Mon Sep 9 00:40:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51424 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1381326vqu; Sun, 8 Sep 2024 19:24:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVCPIyFnb9g6KnVp/aqVsYnicd9sABj6I+4w5ksH1ITwKiRh5hx3QlxwFztF64vfa53wOQyzAy4bwR/+8vBCRta@gmail.com X-Google-Smtp-Source: AGHT+IHUKratTQ8A4uXOQIQ/MnkjV0SzY+dVgKy2GdLPkkOEnypSP8OOdDWp2BVWuTqt3uthH8E2 X-Received: by 2002:a05:6512:b26:b0:533:40dc:823e with SMTP id 2adb3069b0e04-5365880a732mr5919966e87.48.1725848652077; Sun, 08 Sep 2024 19:24:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725848652; cv=none; d=google.com; s=arc-20240605; b=MxJdlaXNHWMBzX5VTdfgjqNQhZgyejTro9l+Z+IYlMosW6jfJ66pehZB3XngVy1RDp 9V3UGu47vbwfcSVo0euCVA2WOPmHZgz8drKmI4JSvIMHWLgR24cYUVj3fZy623mHaI/u dL+6iTzjLsujcF/rs0wdYf5mZYmiMFu/7A8OgUNczowRG0U4bQEvvwJzJ1u/MfwtCvS1 B4S8VT8LVaBQL45yYArsjUMP2dgLQdw5Fj2tlMhf1CVY6HrKPpps7iY6IVE5xcw0FyJ0 iE98A9ByDsW5Z7vZO9KQnLqF72hK4xIGwSqgN1p8VkIrOjM1EH8NYPIJm4f26yMud+Tp Vhfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=e4wZSrQiNYsxqp2LLMISBFliKrlwIsdcrYPM7ugP/zI=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=JOw1QkW0bb9OKcCpV2vnrAuKte5fpJebPCHJPkN1IySBUDFopFMi6xTr/2I96m+otv SGj3RFduzleSjX5UpT0m6sHNVMBGgv4tfmqdDL6gi791DOv96/1UsISwtUhpWz6Flr70 iG34kWLk9d1k0QJTAI6oa6RXpPYQWdDAjzVVRFu8qF1zH2kMbm6Iq9fmRwiOLoitX0Ig y35n2ioqUkX2uSj7S49w9y+A+eRzFlBt6mQOFTZIKrWOyICNeAB2b78APBwsd6Mbho3d 11Q/UHqQDyMJ2KP7tOVYzMjSdZPVOsJwNSlDH/MRoFp2IthvVW/n8mOjYE1/ZLExP1ZB Lyxg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=Z2gP5RtP; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d25c60ebcsi297152766b.309.2024.09.08.19.24.11; Sun, 08 Sep 2024 19:24:12 -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=@gmail.com header.s=20230601 header.b=Z2gP5RtP; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8D17468DE7F; Mon, 9 Sep 2024 03:56:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 23EB168DDA5 for ; Mon, 9 Sep 2024 03:55:54 +0300 (EEST) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-374c1120a32so2167848f8f.1 for ; Sun, 08 Sep 2024 17:55:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843353; x=1726448153; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=HwaJzJ1qO2MqaDyOguD9FrAsKZnzIEmo6jGZ3Cjvup8=; b=Z2gP5RtPkk9BAdQqfqWx3en9E5Ai/CUZf5EAM5pG1Xa8zMCcY7NcWfMFD23FK71pTk Jrv1icxLpPw4Lvti3B6ykksrRL3TWtk9gHNRV8PRkMr+neSymssadz7kVTf52SCjWz1z wX5/wjzZxL+rVNlAs5RpNudqFY5Z4kZjEjJ1+d3vWwXezEHpmtxWaKSufuQSMvxzaCNr waW+WJKv9+HyI3smG8RL8gns5bWiISATAiTCPuCHBGXA+ycAqqWEkf2vlNv9CKXNPvge 0uhVqoA5LuYlNVqUPDDsd5yRSpuFSSAL9inhoodxrlt5YbeCWikwKIaXYUzfC4CDuFA9 J0vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843353; x=1726448153; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=HwaJzJ1qO2MqaDyOguD9FrAsKZnzIEmo6jGZ3Cjvup8=; b=dgCTSvuDDaN2Qfy/RXrEUwPLQKtdn37HACJLg7eQA1rRe1IpW5jvo3Jx+tL6LvnWck yzy/CUk/x/tqXQcz0JyYh7feTORciJeNyPCd4Jaa0Rdfyx1HUpiG2yjnuf9277nXZL6w aE5G14bGj6sCZdH6fkpvRUhhgRO0c21QlKUdN+pVfIfCksxoACSv/EOmDAi5DSuNsI4u DUla8kCIG9M2J4iIadyqFNHJYzK5EvB/RDUgQ2ZTm9u9bZv+S+tbb97aB3tB0zfCFndV YM39OJ0dezllScdY69NMaT2tWVccfWEQFFnuC15/HFWgmS3P5Sz1RsdjIHkVCXcNNu33 0GEA== X-Gm-Message-State: AOJu0Yzfx/Yx0ckXK9DQE/gLaoixF6pOAnMKplObmiLQ87Ft2GaI4Kkd 7/xI1pqX+/uQWxE8+95i+KhISL8OYl67vXPDM6eDA0bz3qPq1odbQ/XDrw== X-Received: by 2002:a5d:40d0:0:b0:374:b97b:c69 with SMTP id ffacd0b85a97d-378896a4166mr5818035f8f.48.1725843353383; Sun, 08 Sep 2024 17:55:53 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.52 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:53 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 02:40:15 +0200 Subject: [FFmpeg-devel] [PATCH 58/60] avformat/avio: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: tJ2CyoLQBpS3 --- libavformat/avio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/avio.c b/libavformat/avio.c index d109f3adff..fd767c9ba9 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -57,7 +57,7 @@ static void *urlcontext_child_next(void *obj, void *prev) #define OFFSET(x) offsetof(URLContext,x) #define E AV_OPT_FLAG_ENCODING_PARAM #define D AV_OPT_FLAG_DECODING_PARAM -static const AVOption options[] = { +static const AVOption url_context_options[] = { {"protocol_whitelist", "List of protocols that are allowed to be used", OFFSET(protocol_whitelist), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D }, {"protocol_blacklist", "List of protocols that are not allowed to be used", OFFSET(protocol_blacklist), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D }, {"rw_timeout", "Timeout for IO operations (in microseconds)", offsetof(URLContext, rw_timeout), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_DECODING_PARAM }, @@ -67,7 +67,7 @@ static const AVOption options[] = { static const AVClass url_context_class = { .class_name = "URLContext", .item_name = urlcontext_to_name, - .option = options, + .option = url_context_options, .version = LIBAVUTIL_VERSION_INT, .child_next = urlcontext_child_next, .child_class_iterate = ff_urlcontext_child_class_iterate, From patchwork Mon Sep 9 00:42:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51425 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1381337vqu; Sun, 8 Sep 2024 19:24:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWx/e+uJNigsZ0LCmV6nq9HguTtxpavK0WJRVYtV4WjKCVaYzFJxk9Aa0KERGmwMdArJIJ6zoQHUmO3XT8wUVFZ@gmail.com X-Google-Smtp-Source: AGHT+IE/PCUZMGbsIHvTbkcfv6F20Rgi+T+FOUPXkP4q193ltvQsW92QJxnmZE8Ll3hNFqcXyuvb X-Received: by 2002:a05:6512:3ca2:b0:535:6ba9:f0d4 with SMTP id 2adb3069b0e04-5365880fd95mr3017832e87.9.1725848653471; Sun, 08 Sep 2024 19:24:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725848653; cv=none; d=google.com; s=arc-20240605; b=Va5XCihpQt0OTfQWQcHHmZFrlsBEqSlL95RL//YY/BfmzsGc73YNB14AxPMvLXlguf yjpPD49BriNCJwwCtgPm3Nq8fkTV19mx/hUovI/npgFeGEjFOjXHWR9Hdmfj0Wg74NuO uQCrHI63J04rOf4uv7HlUWgEqTT8N7KG+wNSfGeAlCk0bXW8Rr+ddtlR6hpIoJd8Xk6M 6MaEzuZ4N9DfT97YcAu+E4jeoVu9a/UC5GlmPsn+Lvx//yJLqrrxjXSE8zg3nk6+0kq/ fTqxdJY1VtndHKSCHIAMiCkyTx3txkv6W8mrGo4hoHBuDnLvgk/HejKRDCNKxWIsxZRd rBug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=a5wwpq7hCQLHS1HDw71aJaXTYPII3FkU66RRhYxfJ/s=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=WbPTB5gU2fotBBMsWFZ2vVODuK5GLtc60QViilkbyjNj9205SLZoP3+B+ElyRU+pUq g0zq6AOGLArbVj/YACvjdfAnGrarTSV3xVuNoxGaKxnIT335All7I9FwRlbWizRnXSp/ cmEWU1VRG5Vrst7UJGChYxbAIuix96nEMIsu2O5AHX0P9tmRkb/xG6EkSzymInn16GfX ig+wiyIuFdhotZzZnR1RPEAV+ceQ1p6ZDUMKW0RI9HQOzz50FGDnPRzROD3ax0/n7fNF UM9kvnumwhF1LWc1vLeZ034DEAso1HY8zbgpmVEkvgCAy/kYJyin3kUUx9EKmp1q8DqP C9Kg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=lNVsYfd3; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f8c15a4si1329662e87.237.2024.09.08.19.24.12; Sun, 08 Sep 2024 19:24:13 -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=@gmail.com header.s=20230601 header.b=lNVsYfd3; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 814AC68DE87; Mon, 9 Sep 2024 03:56:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C81BC68DD72 for ; Mon, 9 Sep 2024 03:55:54 +0300 (EEST) Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-374c1120a32so2167853f8f.1 for ; Sun, 08 Sep 2024 17:55:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843354; x=1726448154; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=dcKfcU55RhyqA/fBt+KCEJpfoncz6N4+CiZlAlOJbaU=; b=lNVsYfd3kHUnnGtV+2ZD4z0LAUxuFjIJ/VSmqzjq7Tkl3wN+wm55WSmjKR8u2vWJh+ 2GVjxSIkyBVlK/W3FCCHOgdlnFObZgIDikHklEGiBEQgzkz3vl3M8BjaBG/8LxN3qWmH 1UcI4VTTonXNYM+JZqBXug8bC+CWW3jp8tM58unudAaggKO9h0isw7oS5hZxyCkYbiLc MJCNk24MRaJsuwhWH9f0ERVivS98xyeKBFzdQONEEtMTOorgGaNV4r/TuvvzBz8+dGyM Zi/i4IFMgmXxAVemk+vJKMNInW+QXOSA7HVmErq7VYenJPwv26q1gU07lTs27ZTWQ0Gf iseA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843354; x=1726448154; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dcKfcU55RhyqA/fBt+KCEJpfoncz6N4+CiZlAlOJbaU=; b=AfAa7H5JABTAn4ckuETaB877l3yqS7aUe2vVWvm36Vgrf37RkfvD8y+4GSBZUX6ISg 3YODFhuvzvRyffLv/Cuig5rHXJsE7p+eRBv/NpWhryySNmzQcwwLsNV9/7VzwNxsLzBJ h2z2AWRjcN+9PdN7/6TjLoMCr04VH6LNh1RoyuDIAKuyegS0hRCLq/wqmNjcgWScIFf2 iT5kfksECUZP2kWVE1aQDArIxC0QGyxa8HgG3QHu1LV8CFn4Qa1TDj9LdX8i6vYQBg3K BI0YOqQtkvvGHjIRjrwMqWRU2xF1VTO0IvjdErshRFH20dGG4QfXxV8r45DnKrTrigam EOmw== X-Gm-Message-State: AOJu0Yyiq5YYMDuQmqpHGNdN3f4X4JGKvbF+DxaLojWJSZGIC2vRy5Um v/F+3Q4Pz9KIFW1GuPWggNDdlmhVkC97dE8jfD14zs46T+IKg8XJWfI66Q== X-Received: by 2002:a5d:4109:0:b0:371:6fba:d555 with SMTP id ffacd0b85a97d-378895cbb8emr6596167f8f.18.1725843354163; Sun, 08 Sep 2024 17:55:54 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:53 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 02:42:03 +0200 Subject: [FFmpeg-devel] [PATCH 59/60] avformat/apetag: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: DviL8XURlVFe --- libavformat/apetag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/apetag.c b/libavformat/apetag.c index 0989fcb094..84645607de 100644 --- a/libavformat/apetag.c +++ b/libavformat/apetag.c @@ -81,7 +81,7 @@ static int ape_tag_read_field(AVFormatContext *s) av_dict_set(&st->metadata, key, filename, 0); if ((id = ff_guess_image2_codec(filename)) != AV_CODEC_ID_NONE) { - int ret = ff_add_attached_pic(s, st, s->pb, NULL, size); + ret = ff_add_attached_pic(s, st, s->pb, NULL, size); if (ret < 0) { av_log(s, AV_LOG_ERROR, "Error reading cover art.\n"); return ret; From patchwork Mon Sep 9 00:47:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marvin Scholz X-Patchwork-Id: 51439 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9c4f:0:b0:48e:c0f8:d0de with SMTP id w15csp1401170vqu; Sun, 8 Sep 2024 20:44:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVTPopeO/qglwo1gfu3aIaVsFZFYVHVLOZZT1reII8ttGOf2wrnzW/eIYOOWjSCoG3+xTl8h0w3OLtJRQACSzQ5@gmail.com X-Google-Smtp-Source: AGHT+IEwU/wDtnyLiWjak9lsz4Ceb/clYOJO9Iuu3n5pHhxjg3PNvVDGFo/TwJ+fL8fSkCUYHrfN X-Received: by 2002:a05:6512:1395:b0:52e:764b:b20d with SMTP id 2adb3069b0e04-536587b4d0emr5447086e87.28.1725853458617; Sun, 08 Sep 2024 20:44:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725853458; cv=none; d=google.com; s=arc-20240605; b=cZ9yeeFXkqwB2UtQtL1dipYAXw/mLkBXDKD3eeGeQTU4yzCcyTuyE3dm70c0YfuVEq Nafup06ofB4ubub8ZB8vP4m2Z2vg2tqfqRzmrDOQwWfzgH911RzkueRAZHjogLQ4x6yt aEZkGoAhgGXxYBI6FW9K7YNvxMMKiU6Kbz2iOzLBLy6moePFyJHMXcRELn9q+epV+kYh F/e3YAZ4n2kwAcMwI694xumnVOJBwpxD3iRehR+rESg11fasuDssweZjVG19onH3cM3L 7LmMmANeKkFn6omwWyHPm8YZ9vbJ0MMyri5d4RqsAs4KDYqq3ooK9HHjUJXU1TTZlO1r Oytw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:date:from:to:message-id:in-reply-to :dkim-signature:delivered-to; bh=RVb/ISSHWRBAooIG1fCbBuh+9pJjWQRylMG0SyDDx2g=; fh=5IeVwzS1vbVKjIV8MP3mnmnRtZGb8uteQ9r4QD2keV0=; b=H3UhafyfaEs7BdCGLSldwS24pRwYdO56ZHbswhEy6wupc6nFEVN2q5G+PGv17D56ZX 023wIekttvLrrMQ7ZtVbcwFsfDOYy6JuVo4IuFo2UWc4YTzFjt2RMjTchmF0MRaSiV3p CjHxogQp4bMAHTmuEEkerfk4bsDmEDLQuDO5CzEWMEGI/JC8nXbusZusuCHLRYq8CjSd /f4U2RNWEf32/QRV27jS84UOSTI1hpO6e0HXgEOGdzgCmyX454JfkRA3Cl8tTtmz/rFC MiP2WEQqcd+IjCtKC0o3hBuIbpK/RHf0NssxLX+48Lzl4CycRCgzT1NRsPKP7HeTz8Yb GlWw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=IIYrIhWh; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-5365f910944si1335096e87.644.2024.09.08.20.44.18; Sun, 08 Sep 2024 20:44:18 -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=@gmail.com header.s=20230601 header.b=IIYrIhWh; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4238868DE90; Mon, 9 Sep 2024 03:56:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BD25968DDAF for ; Mon, 9 Sep 2024 03:55:55 +0300 (EEST) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-374c6187b6eso2252248f8f.0 for ; Sun, 08 Sep 2024 17:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725843355; x=1726448155; darn=ffmpeg.org; h=subject:date:from:to:message-id:in-reply-to:from:to:cc:subject:date :message-id:reply-to; bh=0pkpRiNYFP7WWqNoVWB5DuhMweHO/ZKfH6jYmCPst8c=; b=IIYrIhWh/qzw1a/mMNP2zlf2Uak/jy5HDeOjvIVZw4Sf/NxRTihhJKswJv8XhtKJKo ebsZ6wLFPdSOQ18ze4BXR4k6laS+zUKiqOHLr9xyI1wCmvHcYccGt8wEdtmkBAp5hUfR HtMgtcXm+3cyLKXhOwwKaFcVxzyZSVvVjuQIwkLn/LpS+rgYhU9Pd4SgX+zfCYtNF6H0 /0cnjD47L5iEBa44KN4LtFl2Ho56psloSbdoN/SUg5qCMtVEKfvApNvXJATXC/2/H5GP 22eLsOZGE1XadJ9HWTthBf4XaK/BYxzIICCJ/aIVXAj4whQlO8S1xKW+LtEiHW+uPqpU miDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725843355; x=1726448155; h=subject:date:from:to:message-id:in-reply-to:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=0pkpRiNYFP7WWqNoVWB5DuhMweHO/ZKfH6jYmCPst8c=; b=vjUJvAKFCbZaemme+zdlMzbSvRY6DFykbqAW44d5aHqBhsG5fxdS7rZw82KxQ4NnvH UC0CJ47H0iuxPM5tdvdDozkS9IiozsYqIsAmyIRqp6zhuR5F8bkNbUffNoIYXerMSnQL klOTP8A2FzB6B65kWXeA38mYpc/4TC/tggCO2M+c1iIykkT6A2l5iOEhw4drtY2eRUMB xGZfyKgnOxmoPo8P1g08ke4BVJZfS1+mGG7cdwaMKwZwuk20ICB1+/vx8OYs30j2wP4c 0uxaJMznROdvAYMtralcpyU0XdLZsX/Z5wyDaBqImQRrin9YBGBj221ljHjjtMY3YWrz cGNQ== X-Gm-Message-State: AOJu0Yw7HtlsT8HRrQTRhUriADTC0DGQZnE71RkUfXMGH5iGQSm1y03+ SpsTuh6St5oqxIDrTFrqZRbq6PtiQmBBdaihfaAkDzk0VWfpcuM3XCB0Aw== X-Received: by 2002:a05:6000:d8c:b0:371:8cc3:3995 with SMTP id ffacd0b85a97d-378896035a0mr5997374f8f.34.1725843355043; Sun, 08 Sep 2024 17:55:55 -0700 (PDT) Received: from localhost (p200300cccf1178009d94fda8472792f7.dip0.t-ipconnect.de. [2003:cc:cf11:7800:9d94:fda8:4727:92f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649728sm4583399f8f.16.2024.09.08.17.55.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 17:55:54 -0700 (PDT) In-Reply-To: Message-Id: To: From: "Marvin Scholz" Date: Mon, 9 Sep 2024 02:47:18 +0200 Subject: [FFmpeg-devel] [PATCH 60/60] avfilter/drawutils: fix variable shadowing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 4mvSn+MKE3TT --- libavfilter/drawutils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c index 95525d38b4..b29d3e565e 100644 --- a/libavfilter/drawutils.c +++ b/libavfilter/drawutils.c @@ -156,7 +156,6 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags) void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4]) { - unsigned i; double yuvad[4]; double rgbad[4]; const AVPixFmtDescriptor *desc = draw->desc; @@ -190,7 +189,7 @@ void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4 if (desc->nb_components <= 2) yuvad[1] = yuvad[3]; - for (i = 0; i < desc->nb_components; i++) { + for (unsigned i = 0; i < desc->nb_components; i++) { unsigned val = yuvad[i] * ((1 << (draw->desc->comp[i].depth + draw->desc->comp[i].shift)) - 1) + 0.5; if (desc->comp[i].depth > 8) color->comp[desc->comp[i].plane].u16[desc->comp[i].offset / 2] = val;