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 18471445B2 for ; Fri, 16 Sep 2022 20:15:26 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 27A9B68BC5A; Fri, 16 Sep 2022 23:15:00 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 11C2268BC56 for ; Fri, 16 Sep 2022 23:14:54 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 4F150C000A for ; Fri, 16 Sep 2022 20:14:53 +0000 (UTC) Date: Fri, 16 Sep 2022 22:14:51 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220916201451.GF2088045@pb2> References: <20220907200233.21255-1-pal@sandflow.com> <20220916172655.GV2088045@pb2> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] format/imfdec: improve error handling when selecting tracks for playback 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: multipart/mixed; boundary="===============8471168184099295685==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8471168184099295685== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lrBEqmOBc0oN5XAY" Content-Disposition: inline --lrBEqmOBc0oN5XAY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 16, 2022 at 10:39:22AM -0700, Pierre-Anthony Lemieux wrote: > On Fri, Sep 16, 2022 at 10:27 AM Michael Niedermayer > wrote: > > > > On Wed, Sep 07, 2022 at 01:02:33PM -0700, pal@sandflow.com wrote: > > > From: Pierre-Anthony Lemieux > > > > > > Addresses coverity 1512414 > > > > > > --- > > > libavformat/imfdec.c | 15 ++++++++++++--- > > > 1 file changed, 12 insertions(+), 3 deletions(-) > > > > > > diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c > > > index 5bbe7a53f8..58b1455c9f 100644 > > > --- a/libavformat/imfdec.c > > > +++ b/libavformat/imfdec.c > > > @@ -681,8 +681,11 @@ static IMFVirtualTrackPlaybackCtx *get_next_trac= k_with_minimum_timestamp(AVForma > > > { > > > IMFContext *c =3D s->priv_data; > > > IMFVirtualTrackPlaybackCtx *track; > > > > > + AVRational minimum_timestamp =3D av_make_q(INT_MAX, 1); > > > - AVRational minimum_timestamp =3D av_make_q(INT32_MAX, 1); > > > > iam not sure thats a good idea, it would change behavior on different p= latforms >=20 > I was following the earlier observations that "The initialization of > minimum_timestamp presumes that int are 32bit which need not be true": >=20 > http://ffmpeg.org/pipermail/ffmpeg-devel/2022-August/300587.html >=20 > If I am not mistaken, the numerator and denominator of AVRational are > defined as `int`: >=20 > https://www.ffmpeg.org/doxygen/trunk/structAVRational.html >=20 > What would be the alternative? I dont understand why this code uses AVRational for timestamps normally timestamps are int64_t with a AVRational timebase and would use av_compare_ts() for comparing thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When you are offended at any man's fault, turn to yourself and study your own failings. Then you will forget your anger. -- Epictetus --lrBEqmOBc0oN5XAY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYyTZOAAKCRBhHseHBAsP q29IAJ0Qu56i6t38BE8ipJHsJYFS0v3BcQCffVCp0BeeKXiHuNkiO/xr5ve04Ic= =37em -----END PGP SIGNATURE----- --lrBEqmOBc0oN5XAY-- --===============8471168184099295685== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============8471168184099295685==--