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++) {