From patchwork Tue Jan 11 09:58:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 33226 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp3547558iog; Tue, 11 Jan 2022 02:03:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJzd40lcYJzGHZn4fFAIViT+9unByUex5dI8f48DrVoYAjBTM27jPllhyxvkueFgRRX5MVpA X-Received: by 2002:a17:906:608:: with SMTP id s8mr3217005ejb.754.1641895391446; Tue, 11 Jan 2022 02:03:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641895391; cv=none; d=google.com; s=arc-20160816; b=lelzLO0udrJyIIwaKeAbJL1VA0/RzlXZtfeerK661z3tzP0ofqXYsN/ISwTtp/KSKY 4g/k4qEiOQ5auZbA/4J1rn0BUR9EQ3zQE2kDtdVbxThF9iwr5ruNDtlfs3tr8OajG9Y/ ylvkxhVMO191s1iEiS0GPXBqeXfrf3zzh74FvQ8V1D7h9F0337ZGSTw14/LZBTMTTDTX rxufg9XSRhzdnbMHbOEJ5v7yABxAgmBE8oAm3juqgICWVB7edB33PD7p/jvQy2360ikP VO6ohtd+fl/rxiO5n+iQTKNHj5iSzW2mCwzxrxNGZFOn4317E4gwLXqOB0MzhZc6hZKC 8Jjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=UMLgllH6Xuzd3kCNZDTMeKhHlEZDnnRAjJ5bbMUYlu8=; b=dBaRaAwxm1A140bU5du3sjQgj6xV0a1A3Z9c9JG9NcFpWTW2o5HvkjAiZgTUtRy1gO 6XRmdD0ZCisHMJGvLWwMm/Xoy5IM+tLFkgnN9RetcvhEduo+TZm/jNVVLhnCGyH36iVf Xdh0V1qdU7e8gXgvQgSKusjkEgHaGquxy6vV5SCEngEN0DyZtI0coBtY/V+JLOoN4w/H aAnd49zUBuTGyU8o9ksmgTGZ/yLc3ZzWffL8KNtQJDNphJWw7Fnl6/yRNCH8S6xDuo0y XuqjiFuhI9GIQ7o5veJGQBzx/F7cDtXNk6kp2IG8DBch+2J9DaNS2lAT2zae+IvNoPDc hyyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id o17si4691406ejy.466.2022.01.11.02.03.11; Tue, 11 Jan 2022 02:03:11 -0800 (PST) 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; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5E8FB68B009; Tue, 11 Jan 2022 11:59:32 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 90B1E68AF45 for ; Tue, 11 Jan 2022 11:59:10 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id CEA0024052D for ; Tue, 11 Jan 2022 10:59:07 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id mHdeKMZPG3Eq for ; Tue, 11 Jan 2022 10:59:07 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 94D86240555 for ; Tue, 11 Jan 2022 10:59:02 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id EFB6C3A09CE; Tue, 11 Jan 2022 10:59:01 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Tue, 11 Jan 2022 10:58:11 +0100 Message-Id: <20220111095830.31542-9-anton@khirnov.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220111095830.31542-1-anton@khirnov.net> References: <20220111095830.31542-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 09/28] ffmpeg: fix the type of limit_filesize X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: FTCEaNklTC+/ The option is parsed as INT64 (signed). It is also compared to the output of avio_tell(), which is also int64_t. --- fftools/ffmpeg.h | 4 ++-- fftools/ffmpeg_opt.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index dfcaa875d9..80b90e372d 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -145,7 +145,7 @@ typedef struct OptionsContext { int64_t recording_time; int64_t stop_time; - uint64_t limit_filesize; + int64_t limit_filesize; float mux_preload; float mux_max_delay; int shortest; @@ -586,7 +586,7 @@ typedef struct OutputFile { int ost_index; /* index of the first stream in output_streams */ int64_t recording_time; ///< desired length of the resulting file in microseconds == AV_TIME_BASE units int64_t start_time; ///< start time in microseconds == AV_TIME_BASE units - uint64_t limit_filesize; /* filesize limit expressed in bytes */ + int64_t limit_filesize; /* filesize limit expressed in bytes */ int shortest; } OutputFile; diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 2ed09d4a7a..4d2b80683e 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -220,7 +220,7 @@ static void init_options(OptionsContext *o) o->start_time = AV_NOPTS_VALUE; o->start_time_eof = AV_NOPTS_VALUE; o->recording_time = INT64_MAX; - o->limit_filesize = UINT64_MAX; + o->limit_filesize = INT64_MAX; o->chapters_input_file = INT_MAX; o->accurate_seek = 1; o->thread_queue_size = -1;