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 1C84C42F52 for ; Wed, 15 Jun 2022 21:05:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1E88868B685; Thu, 16 Jun 2022 00:05:54 +0300 (EEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B6B6168AF8A for ; Thu, 16 Jun 2022 00:05:47 +0300 (EEST) Received: from localhost (213-47-68-29.cable.dynamic.surfer.at [213.47.68.29]) (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id B4EA6240006 for ; Wed, 15 Jun 2022 21:05:46 +0000 (UTC) Date: Wed, 15 Jun 2022 23:05:45 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220615210545.GO396728@pb2> References: <10ec51ef44325c2de6d5de7b994a9b6c8eb5e3a2.camel@acc.umu.se> <2ab7238154c98289a19f655c87a20c339561b3e8.camel@acc.umu.se> <20220614211115.GM396728@pb2> <5deb4edec095bd49cfa889107a00001c8539ae9a.camel@acc.umu.se> MIME-Version: 1.0 In-Reply-To: <5deb4edec095bd49cfa889107a00001c8539ae9a.camel@acc.umu.se> Subject: Re: [FFmpeg-devel] [PATCH 05/13] lavc/jpeg2000dec: Thread init_tile() 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="===============5341621323583618167==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5341621323583618167== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3McLx17X1dD5aQEg" Content-Disposition: inline --3McLx17X1dD5aQEg Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 15, 2022 at 03:11:34PM +0200, Tomas H=E4rdin wrote: > tis 2022-06-14 klockan 23:11 +0200 skrev Michael Niedermayer: > > On Tue, Jun 14, 2022 at 04:41:14PM +0200, Tomas H=E4rdin wrote: > > >=20 > >=20 > > > =A0jpeg2000dec.c |=A0=A0 30 +++++++++++++++--------------- > > > =A01 file changed, 15 insertions(+), 15 deletions(-) > > > 6fa2fbf99afee36ee73459863df0527a72663f43=A0 0005-lavc-jpeg2000dec- > > > Thread-init_tile.patch > > > From 080ebdc9bad130098bff575f9ce690b8a522c9f7 Mon Sep 17 00:00:00 > > > 2001 > > > From: =3D?UTF-8?q?Tomas=3D20H=3DC3=3DA4rdin?=3D > > > Date: Mon, 13 Jun 2022 15:09:17 +0200 > > > Subject: [PATCH 05/13] lavc/jpeg2000dec: Thread init_tile() > >=20 > > Causes segfaults > >=20 > > [jpeg2000 @ 0x2cf53380] End mismatch 149 > > [jpeg2000 @ 0x2cf53380] =3D=3D1439=3D=3D Thread 6: > > =3D=3D1439=3D=3D Invalid read of size 4 > > =3D=3D1439=3D=3D=A0=A0=A0 at 0x9771F0: jpeg2000_mct_write_frame (in ffm= peg_g) > > =3D=3D1439=3D=3D=A0=A0=A0 by 0x78BA6F: avcodec_default_execute2 (in ffm= peg_g) > > =3D=3D1439=3D=3D=A0=A0=A0 by 0x97C0BB: jpeg2000_decode_frame (in ffmpeg= _g) > > =3D=3D1439=3D=3D=A0=A0=A0 by 0xA90F72: frame_worker_thread (in ffmpeg_g) > > =3D=3D1439=3D=3D=A0=A0=A0 by 0x54046DA: start_thread (pthread_create.c:= 463) > > =3D=3D1439=3D=3D=A0=A0=A0 by 0xF8F261E: clone (clone.S:95) > >=20 > > i will send you the sample privatly >=20 > This is because init_tile() fails. I had assumed errors were handled in > some way like longjmp since the function already called execute2() but > it seems the threading doesn't do any kind of magic for this. >=20 > Can we have execute2() return some kind of error code when one or more > jobs fail? Either say FFMIN() of all errors or negative jobnr that > failed? This would save on having to allocate an array for errors when > we don't really care which exact jobs failed.. one could return a struct with error code, index and number of failed ones or something. But then maybe just atomically setting some error flag and leaving the API would be fine too. Iam fine with either thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Republics decline into democracies and democracies degenerate into despotisms. -- Aristotle --3McLx17X1dD5aQEg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYqpJpgAKCRBhHseHBAsP qwmaAJ41GLpWEUGDm1vcb/oMEgt69gtLPgCgjuSTHT15l8bD6BEsd19Jd/Cp0H0= =Z8zp -----END PGP SIGNATURE----- --3McLx17X1dD5aQEg-- --===============5341621323583618167== 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". --===============5341621323583618167==--