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;