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 8FE2544EFA for ; Wed, 28 Jun 2023 15:25:09 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F354168C382; Wed, 28 Jun 2023 18:25:05 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F06BC68C09C for ; Wed, 28 Jun 2023 18:24:59 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id BA5622404EC for ; Wed, 28 Jun 2023 17:24:59 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id eMskfmh4IQ2s for ; Wed, 28 Jun 2023 17:24:59 +0200 (CEST) Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (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 "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 3D31B2404EA for ; Wed, 28 Jun 2023 17:24:59 +0200 (CEST) Received: by lain.khirnov.net (Postfix, from userid 1000) id 1ECF81601B2; Wed, 28 Jun 2023 17:24:59 +0200 (CEST) From: Anton Khirnov To: "ffmpeg-devel@ffmpeg.org" In-Reply-To: =?utf-8?q?=3CDM6PR11MB26814011FF82B8637DF846B7B14DA=40DM6PR11MB?= =?utf-8?q?2681=2Enamprd11=2Eprod=2Eoutlook=2Ecom=3E?= References: =?utf-8?q?=3CDM6PR11MB26814011FF82B8637DF846B7B14DA=40DM6PR11MB2?= =?utf-8?q?681=2Enamprd11=2Eprod=2Eoutlook=2Ecom=3E?= Mail-Followup-To: "ffmpeg-devel@ffmpeg.org" Date: Wed, 28 Jun 2023 17:24:59 +0200 Message-ID: <168796589909.21886.12641050031611059268@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH v2] avformat/ivfenc: Set the "number of frames" in IVF header 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Quoting Dai, Jianhui J (2023-06-05 02:53:35) > diff --git a/libavformat/ivfdec.c b/libavformat/ivfdec.c > index 511f2387ed..01012db948 100644 > --- a/libavformat/ivfdec.c > +++ b/libavformat/ivfdec.c > @@ -53,6 +53,7 @@ static int read_header(AVFormatContext *s) > st->codecpar->height = avio_rl16(s->pb); > time_base.den = avio_rl32(s->pb); > time_base.num = avio_rl32(s->pb); > + // Infer duration from "number of frames". > st->duration = avio_rl32(s->pb); This should be setting st->nb_frames then rather than duration. And the muxer should be using that field as well instead of its custom version. -- Anton Khirnov _______________________________________________ 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".