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 DBC5744758 for ; Thu, 22 Sep 2022 15:02:13 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 409BC68BBCF; Thu, 22 Sep 2022 18:02:12 +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 452EB68BA53 for ; Thu, 22 Sep 2022 18:02:05 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 0049EC000D for ; Thu, 22 Sep 2022 15:02:03 +0000 (UTC) Date: Thu, 22 Sep 2022 17:02:02 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220922150202.GI6583@pb2> References: <20220911142721.30812-1-michael@niedermayer.cc> <668f68e10246f876066b8930bb4b3a1174f14b33.camel@acc.umu.se> MIME-Version: 1.0 In-Reply-To: <668f68e10246f876066b8930bb4b3a1174f14b33.camel@acc.umu.se> Subject: Re: [FFmpeg-devel] [PATCH 1/5] avformat/mxfdec: Avoid some redundant writing to tables in mxf_compute_ptses_fake_index() 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="===============3882342537249690825==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3882342537249690825== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WHz+neNWvhIGAO8A" Content-Disposition: inline --WHz+neNWvhIGAO8A Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 20, 2022 at 01:12:44PM +0200, Tomas H=E4rdin wrote: > s=F6n 2022-09-11 klockan 16:27 +0200 skrev Michael Niedermayer: > > Signed-off-by: Michael Niedermayer > > --- > > =A0libavformat/mxfdec.c | 4 ++-- > > =A01 file changed, 2 insertions(+), 2 deletions(-) > >=20 > > diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c > > index e63e803aa56..4ceb6cf672f 100644 > > --- a/libavformat/mxfdec.c > > +++ b/libavformat/mxfdec.c > > @@ -1939,10 +1939,10 @@ static int > > mxf_compute_ptses_fake_index(MXFContext *mxf, MXFIndexTable *index_ta > > =A0=A0=A0=A0 if (index_table->nb_ptses <=3D 0) > > =A0=A0=A0=A0=A0=A0=A0=A0 return 0; > > =A0 > > -=A0=A0=A0 if (!(index_table->ptses=A0=A0=A0=A0=A0 =3D av_calloc(index_= table->nb_ptses, > > sizeof(int64_t))) || > > +=A0=A0=A0 if (!(index_table->ptses=A0=A0=A0=A0=A0 =3D av_malloc_array(= index_table- > > >nb_ptses, sizeof(int64_t))) || > > =A0=A0=A0=A0=A0=A0=A0=A0 !(index_table->fake_index =3D av_calloc(index_= table->nb_ptses, > > sizeof(AVIndexEntry))) || > > =A0=A0=A0=A0=A0=A0=A0=A0 !(index_table->offsets=A0=A0=A0 =3D av_calloc(= index_table->nb_ptses, > > sizeof(int8_t))) || > > -=A0=A0=A0=A0=A0=A0=A0 !(flags=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 =3D av_calloc(index_table->nb_ptses, > > sizeof(uint8_t)))) { > > +=A0=A0=A0=A0=A0=A0=A0 !(flags=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 =3D av_malloc_array(index_table- > > >nb_ptses, sizeof(uint8_t)))) { >=20 > Looks OK. Seems like the same thing can be done with offsets willl apply with offsets too thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB There will always be a question for which you do not know the correct answe= r. --WHz+neNWvhIGAO8A Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYyx45gAKCRBhHseHBAsP qxFVAJsEoCiROP0LpJ2o2hfuDSltCsiP/gCfXStTVQnUaUrmHsRjZmpnVKEsc6c= =Cjot -----END PGP SIGNATURE----- --WHz+neNWvhIGAO8A-- --===============3882342537249690825== 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". --===============3882342537249690825==--