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 B0910445B8 for ; Fri, 16 Sep 2022 20:19:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9167168BC44; Fri, 16 Sep 2022 23:19:31 +0300 (EEST) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DE43668BB90 for ; Fri, 16 Sep 2022 23:19:25 +0300 (EEST) Received: by mail-pf1-f175.google.com with SMTP id b75so17027483pfb.7 for ; Fri, 16 Sep 2022 13:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandflow-com.20210112.gappssmtp.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date; bh=QGGkB0Skti4vorUFfWzR7eL0qGOfJftqZcOgVsv3Q3g=; b=ATWA1aUgwlZZH2Xd9enBsDyE2lLtMr+7OBJMis9BHelHieUals8vAwR6qlunheMlMZ G5+fbeN90CdHwtgdE+yjwgG7G9Da1isfjQAwPvvTyRHpHCRriTJeafwWiypM6BferQXY 2DpJ9rxYanvBTonsFfRJCm32HfwdcgTOZ+P7xDxZvlPGYkgmV7Uer5AFD5r9fovRNPFs VdA1IwQvNsgirK4vBYWkGQVXaD7UZYXZ8iT5bFA/C9GnrtDKyNQm3UM/WCPZ1+pvH6Ai eeYMKBs4FPfoVB2AyGVUtrXyflNcwoI000uBKVYq1Cwm/g0rteExdc1ZOwBUUMPf8BVR jWOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date; bh=QGGkB0Skti4vorUFfWzR7eL0qGOfJftqZcOgVsv3Q3g=; b=MfWwkv7Aa5vC45XL7nYIUEnnbDB2SvVrk1HOaMlnM2wh2p3hyTCeKuYcT+j563uAFe JtAc2huGmDQco1fnbcHvD7V/RqeViA/E/IpOvgzawqlb4zW3AHhU3tpYNlWo4VlMrMsK qV4utglQ+T/uYmu5OClHIBKu92LKgasC7wZKW8MmrcEXT31IrklYXN8y5OzANwM3sdH/ 50Wlx8J/buQXYvnG/JMPdeaUdRV6PYoBZRlPIG6EaGJlJdcRrS2d09bSlxrnrm+AiyJN gNZNZgsuhxU89XTAcIEwEch9tWretDDHRI2HbIb3Y1QKFjY5yynq84awewH0K5O31GQr uNKw== X-Gm-Message-State: ACrzQf1+Pqvamd0cN9Udo48arE3V9UVmdUSFBOLhn3AlCZnTHrtcmsxT D1HdQ1Dwnf/vJlUQN2ta6FPlsPJiTMOdNQ== X-Google-Smtp-Source: AMsMyM5tTUkpleHOCvENCgL1wTRPI/yKMC2D5h/vKOd2cMLyadR5IXkgUP3mCpvZU3/SfD3il7ncQQ== X-Received: by 2002:a63:5702:0:b0:42a:b77b:85b3 with SMTP id l2-20020a635702000000b0042ab77b85b3mr5820546pgb.263.1663359563769; Fri, 16 Sep 2022 13:19:23 -0700 (PDT) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com. [209.85.214.181]) by smtp.gmail.com with ESMTPSA id i6-20020a17090a718600b00202b5053481sm1826369pjk.57.2022.09.16.13.19.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Sep 2022 13:19:23 -0700 (PDT) Received: by mail-pl1-f181.google.com with SMTP id w13so6813260plp.1 for ; Fri, 16 Sep 2022 13:19:22 -0700 (PDT) X-Received: by 2002:a17:90b:1c8e:b0:1f7:5250:7b44 with SMTP id oo14-20020a17090b1c8e00b001f752507b44mr18240236pjb.212.1663359562085; Fri, 16 Sep 2022 13:19:22 -0700 (PDT) MIME-Version: 1.0 References: <20220907200233.21255-1-pal@sandflow.com> <20220916172655.GV2088045@pb2> <20220916201451.GF2088045@pb2> In-Reply-To: <20220916201451.GF2088045@pb2> From: Pierre-Anthony Lemieux Date: Fri, 16 Sep 2022 13:19:09 -0700 X-Gmail-Original-Message-ID: Message-ID: To: FFmpeg development discussions and patches 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: 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: On Fri, Sep 16, 2022 at 1:15 PM Michael Niedermayer wrote: > > 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_track_with_minimum_timestamp(AVForma > > > > { > > > > IMFContext *c = s->priv_data; > > > > IMFVirtualTrackPlaybackCtx *track; > > > > > > > + AVRational minimum_timestamp = av_make_q(INT_MAX, 1); > > > > - AVRational minimum_timestamp = av_make_q(INT32_MAX, 1); > > > > > > iam not sure thats a good idea, it would change behavior on different platforms > > > > I was following the earlier observations that "The initialization of > > minimum_timestamp presumes that int are 32bit which need not be true": > > > > http://ffmpeg.org/pipermail/ffmpeg-devel/2022-August/300587.html > > > > If I am not mistaken, the numerator and denominator of AVRational are > > defined as `int`: > > > > https://www.ffmpeg.org/doxygen/trunk/structAVRational.html > > > > 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 Temporal offsets on IMF tracks are typically expressed as rationals, and each track can have its own timebase. > > thx > > [...] > > -- > 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 > _______________________________________________ > 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". _______________________________________________ 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".