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 E7BAC4362A for ; Sat, 17 Sep 2022 15:58:02 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9925D68BB3F; Sat, 17 Sep 2022 18:57:59 +0300 (EEST) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B5AEC68BB30 for ; Sat, 17 Sep 2022 18:57:53 +0300 (EEST) Received: by mail-pj1-f46.google.com with SMTP id y11so6877824pjv.4 for ; Sat, 17 Sep 2022 08:57:53 -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=4/luPGzrka/LFxKTO/q81kVfZWwTLnRM77c6d1Us7MI=; b=hxin8XNwNJvYT/Ky/nObHWwHIKZFI9ZNUqLsJZf0wEm3JHkBfsY6y4cG92u0MDbB9V sYPRwM2Q9OL8Nhro+MWDRU6uqMJGzmZbLUa5I+fus4S6v+/M9gjNxBp6h1WEamGg7Ocr 0ud2mUdltKgNZvoDl0nDvde6h8Fw99SpqZgbOKrl4BtcNBSC5rC70ux4j0kdNmE8yQt9 LvxQMCjf2xsZfWAA7azDys4XlFSqtDgEh8NIwgdx9Bg94evB8Icav182aryvSOG/RWvZ J9ki+jwMzCEd2/XWgts5I0TaIS9NH+DLRSIPbOFgP2wtpE/BYV/VniSJNY2mxVeVCCs/ WzdA== 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=4/luPGzrka/LFxKTO/q81kVfZWwTLnRM77c6d1Us7MI=; b=1rEleUpWTvu51p7kIwh7BMFgLqn04n4aQvvlQw3nq4NK/PLYSX5ZK4nnBBEyja/adf uc7dhChqR++hd2ySfqssN42HsuVV57EOimr67Q0s7vpyHhMXuwME56Z8QHD/npXCnn7u oRLRt3V5LnMHxSGwS7w4UZpVtQsUxVS5VvGLhRJ/X5laqKcipodEJVlEqJsTtOfVIYro gFFusd4Zjp7dZOY+POGIy7xCzXRl2PWcij7BM5wQDDDOsmBBKAyv1d1nAw69OKoXt07g Kht2kiLPGB6U/8z35gJtRKBACVITZbHaIQkq+BCWnT7jBtVC3rBBAW4cWu4/mWsi8sae nmdg== X-Gm-Message-State: ACrzQf0QdKAOCudilrwiBLpQmRwVcJxj7w9NfuNpeCDQ2UqRfrx82UN4 li+QzQZJLkMNbQWxicw22+5PyiWbxAPmqA== X-Google-Smtp-Source: AMsMyM5X0kIMb8pk1mOS5eERjtl3wed8fwMzXgdeG+IExqAf93TDOP9eJOA6E2AV+3KHBjp79QC5iw== X-Received: by 2002:a17:90b:388e:b0:202:c42a:d360 with SMTP id mu14-20020a17090b388e00b00202c42ad360mr22211891pjb.158.1663430271372; Sat, 17 Sep 2022 08:57:51 -0700 (PDT) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com. [209.85.216.48]) by smtp.gmail.com with ESMTPSA id e14-20020aa7980e000000b0053ab9c18d3csm17526369pfl.14.2022.09.17.08.57.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 17 Sep 2022 08:57:50 -0700 (PDT) Received: by mail-pj1-f48.google.com with SMTP id x1-20020a17090ab00100b001fda21bbc90so2678631pjq.3 for ; Sat, 17 Sep 2022 08:57:50 -0700 (PDT) X-Received: by 2002:a17:902:d2cc:b0:178:1742:c182 with SMTP id n12-20020a170902d2cc00b001781742c182mr5133219plc.98.1663430269406; Sat, 17 Sep 2022 08:57:49 -0700 (PDT) MIME-Version: 1.0 References: <20220907200233.21255-1-pal@sandflow.com> <20220916172655.GV2088045@pb2> <20220916201451.GF2088045@pb2> <20220917144322.GG2088045@pb2> In-Reply-To: <20220917144322.GG2088045@pb2> From: Pierre-Anthony Lemieux Date: Sat, 17 Sep 2022 08:57:37 -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 Sat, Sep 17, 2022 at 7:43 AM Michael Niedermayer wrote: > > On Fri, Sep 16, 2022 at 01:19:09PM -0700, Pierre-Anthony Lemieux wrote: > > 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. > > av_compare_ts() can compare 2 timestamps in 2 different timebases > > the problem with using AVRational for timestamps in 1sec units is > that alot of 64bit * 32/32bit timestamps cannot be represented exactly Ok. It might be possible to refactor the imfdec timing model in terms of (int) time offset + timebase instead of (rational) time offset, or at least detect when the current scheme fails. This will require careful study. Any objections to tackling this refactoring as a separate patchset, since this patchet is intended to address the coverity issue? > > > thx > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > In fact, the RIAA has been known to suggest that students drop out > of college or go to community college in order to be able to afford > settlements. -- The RIAA > _______________________________________________ > 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".