From patchwork Mon Apr 4 11:30:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 35181 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c05:b0:7a:e998:b410 with SMTP id bw5csp1913787pzb; Mon, 4 Apr 2022 04:37:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZAjBCCs0uPbJXxILzKZCKlog0IBkuylfRvyHMLEkEjS4AHcuDVVFpfYnubbexiEssKDpT X-Received: by 2002:a05:6402:4315:b0:419:2e38:ab8f with SMTP id m21-20020a056402431500b004192e38ab8fmr32722278edc.250.1649072220841; Mon, 04 Apr 2022 04:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649072220; cv=none; d=google.com; s=arc-20160816; b=vFfE4jGrHyH+jl/Z6QztIEuIJ/aCXWS59MvYXQ1H9Jm0WodyG7HXaFFIMrfqTIIVmi QpBNnZAyLq66otXhk83hSDiWIomp6JBJaqL04IQ5HvLf6tx11Sngz/Ao0lAlOjajnSO1 fXigDprrBdZYybY8CshblSV+J5RJut0VyJ6lneiT4J6xFOow6SQV2SR1hzxgYZFdZvQJ Gx+NJ8R0nfEkbVJCFn34C92mFd6MC4K8VIEtcsz1ewHTy9dIPgOvgAHyQza+rPyKyRua z6cYxLACmQe74V9yutfua2vzYsn7t9gptOyT8Ie+G2dhkaYtcD9OkyrD5VyS0ZAsF12q N5GA== 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=Sg26YoNJ+QKiu3qL1HjjCNYphIHOJIpL0UKtWCDxV2w=; b=UCmKhTtpArfi32uOE+Yt5NToeSe46z13E0icjQkzmp73czXcjh3LzrAofEkIRvMJT3 nsrr8o60ogU56uSiSw9RAq2w/37/QdEUrok7PBEL/ejsjc3bxaRl0CPdoTZaEkbb9hXM CTRQ0HeGLgZUwSTuLyrpMqnlvFjTdPX3vg36E676xEF7QGbBgWKV2rpTT9/8Ugw5Ajgj UMp910Pe+OtZsSEi2oc/xjjnXOYC26TgImjCLepMwXkOR8sa9AN3dhpiuWfZjYup2Zim sO5HTjKM5lLlejDD+FYzZ1Dmqtz8spHmqEXbDpY772u1MBctOjZRHSJrZ6p/dwnJ+log 7VXQ== 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 f9-20020a50bf09000000b00418c2b5bd87si6172503edk.105.2022.04.04.04.37.00; Mon, 04 Apr 2022 04:37:00 -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; 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 3C54D68B331; Mon, 4 Apr 2022 14:32:49 +0300 (EEST) 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 973B168AEFE for ; Mon, 4 Apr 2022 14:32:22 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 0C37024052D for ; Mon, 4 Apr 2022 13:32:19 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id RP16Jv7L9p76 for ; Mon, 4 Apr 2022 13:32:18 +0200 (CEST) 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 EE3DE240555 for ; Mon, 4 Apr 2022 13:32:14 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id C52913A0A30; Mon, 4 Apr 2022 13:32:11 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Apr 2022 13:30:00 +0200 Message-Id: <20220404113037.13070-13-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220404113037.13070-1-anton@khirnov.net> References: <20220404113037.13070-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 12/49] fftools/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: Vph4/kQVcjUS 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 fa7b202ae6..d76f4266d6 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -147,7 +147,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; @@ -589,7 +589,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 fff230eafc..4e601f1cf8 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -228,7 +228,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;