From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id CB5B345F41 for ; Wed, 19 Apr 2023 20:42:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8EF2F68BE6B; Wed, 19 Apr 2023 23:42:30 +0300 (EEST) Received: from mail-oa1-f46.google.com (mail-oa1-f46.google.com [209.85.160.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7A75B68A855 for ; Wed, 19 Apr 2023 23:42:24 +0300 (EEST) Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-187ef4d7863so110658fac.0 for ; Wed, 19 Apr 2023 13:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681936942; x=1684528942; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=phSYiKO8tXy5KKG1jC9Kshe2tRvYYsQj8xxxIMx5muk=; b=rxIcA4jOO8s+AXcSXkCaVIs/aloyp2OQID6JR49pEuQCBxc8b3yqjpkAPvMP5P6w3A /hv+tJUCd/S9c3+z1udHk8vqin5N8e1GvBq7Y1IR+Kz9itNaJkmIltHoLQsXN/2bGZps k1IF0ESHGhigkjjkgBQ5AnmMr+2qrF+lACVgd7lwRNYoFEqQ/32AwOtANXalOsWqsOvv q0xRendoyZvJrdg1+++S33Zjz507D/XnYRlAkhSh6SgGdEy+GL/lAu8d1Qon3W84IbJe DIuv0fNRlJq18l1NFsZhdjOSjrs0cus0btAnxNPvvJ1hZKYlUTKtunuv6cBxHZzH6DJU pmrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681936942; x=1684528942; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=phSYiKO8tXy5KKG1jC9Kshe2tRvYYsQj8xxxIMx5muk=; b=ShGG0HvUpkbLFg7FfXWh1a9SgsscP2So0jDCGADGpMgzuosuqy+ErMjKzsIn4ozDw0 gnvc4rEk4OPnBbwUOevxd2RBipglyuf9kx9iVgjiOYKsNItNo2APNR6Eoy1S94LxQzT4 PAkYDv3pAmKNg1fN4UghfFYjzPc93P/C4At+JEN8LGc49q2/LJU/A+zUw2rv4GI1n7jr XXYfkD6l6Hpz8eyb+hz7e2zq6463rK56IarS0UQ9Q1VklYnSxEH/SAzQ3vj3tnhPsqVl FOraQhvKEXffPi2zLB8G/rxpgW8BK1bZOt7106ZheSJtfPz9w9SGk+v7h59PXREQgOy8 PvTA== X-Gm-Message-State: AAQBX9eiIsY/e3BFTZrW/e4zqjZbQUiFJ7qLRiFurf/AZw6zaTFdP/xL 7GhNsEl6KHvD8RPPiK8jvyRQqMyBDwM= X-Google-Smtp-Source: AKy350ZamvtSswRviFtnooUdtKTwOSIPfBTtFopkSNDZ9l+ZHKytos5d/v/VPNEX1W4pFuHwXBCFeQ== X-Received: by 2002:a05:6870:d1d3:b0:17e:9b7:387b with SMTP id b19-20020a056870d1d300b0017e09b7387bmr549416oac.11.1681936942520; Wed, 19 Apr 2023 13:42:22 -0700 (PDT) Received: from [192.168.0.15] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id u36-20020a056870b0e400b0016e49af5815sm6518oag.51.2023.04.19.13.42.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Apr 2023 13:42:22 -0700 (PDT) Message-ID: Date: Wed, 19 Apr 2023 17:42:24 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20230419195243.2974-1-anton@khirnov.net> <20230419195243.2974-4-anton@khirnov.net> From: James Almer In-Reply-To: <20230419195243.2974-4-anton@khirnov.net> Subject: Re: [FFmpeg-devel] [PATCH 04/25] fftools/ffmpeg_enc: always use video frame durations when available 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 4/19/2023 4:52 PM, Anton Khirnov wrote: > diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c > index e3dc858bc3..9aaec277f1 100644 > --- a/fftools/ffmpeg_enc.c > +++ b/fftools/ffmpeg_enc.c > @@ -1005,24 +1005,17 @@ static void do_video_out(OutputFile *of, > AVRational frame_rate; > int64_t nb_frames, nb_frames_prev, i; > double duration = 0; > - InputStream *ist = ost->ist; > AVFilterContext *filter = ost->filter->filter; > > - frame_rate = av_buffersink_get_frame_rate(filter); > - if (frame_rate.num > 0 && frame_rate.den > 0) > - duration = 1/(av_q2d(frame_rate) * av_q2d(enc->time_base)); > + if (next_picture) > + duration = lrintf(next_picture->duration * av_q2d(next_picture->time_base) / av_q2d(enc->time_base)); llrint(). You're passing it a double argument, and long int is 32 bits on Windows. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".