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 36F1443BEA for ; Fri, 22 Jul 2022 16:23:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0994F68B6EC; Fri, 22 Jul 2022 19:23:05 +0300 (EEST) Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BD1EA68B3FC for ; Fri, 22 Jul 2022 19:22:58 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 0EA45200005 for ; Fri, 22 Jul 2022 16:22:57 +0000 (UTC) Date: Fri, 22 Jul 2022 18:22:56 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220722162256.GP2088045@pb2> References: <6301fb24-1d5d-b069-a773-0defdc2086df@ycbcr.xyz> <20220718185632.GT2088045@pb2> MIME-Version: 1.0 In-Reply-To: <20220718185632.GT2088045@pb2> Subject: Re: [FFmpeg-devel] [PATCH] avcodec/pthread_frame: update the main avctx from the current, ThreadContext 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="===============6201562018284068506==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6201562018284068506== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oDT6ON1uLKeoILhE" Content-Disposition: inline --oDT6ON1uLKeoILhE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 18, 2022 at 08:56:32PM +0200, Michael Niedermayer wrote: > On Sat, Jul 09, 2022 at 08:45:31AM +0200, Steve Lhomme wrote: > > Patch attached in the email. > >=20 > > In some cases, the submit packet can result in configurations changes o= f the > > hardware decoders. The previous HW context is then freed and a new one > > created. That context is supposed to move up to the main context and the > > other threads. > >=20 > > It appears that when more than 2 frame threads are involved, the new co= ntext > > doesn't move in the right place (or rather at the right time). And it c= an > > create a crash when reusing the old HW context. This patch fixes the is= sue I > > could reproduce in VLC with DXVA decoding. > >=20 > > I have no idea if this is correct or the side effects induced by this. = It > > seems the right thing to do. Keeping the previous call exhibits the iss= ue. > > It seems odd the other existing thread context are not updated with the > > current hwaccel_priv_data. But maybe they are updated later from the "m= ain" > > thread context, in which case this patch seems solid. >=20 > > pthread_frame.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > 2274e52382008f403c7bf52f76d608d2a56ef859 0001-avcodec-pthread_frame-up= date-the-main-avctx-from-the.patch > > From e8abeeff92f5d7b3b553acdb7595d40153cbec1e Mon Sep 17 00:00:00 2001 > > From: Steve Lhomme > > Date: Fri, 8 Jul 2022 11:49:27 +0200 > > Subject: [PATCH] avcodec/pthread_frame: update the main avctx from the = current > > ThreadContext > >=20 > > After a submit_decoder() the hwaccel_priv_data may have changed in that= avctx. > >=20 > > Doing it after the "next available frame" loop will likely point to the > > hwaccel_priv_data from another PerThreadContext which had the old value= which > > might have been freed, if the submit_decoder() resulting in a format ch= ange. > > --- > > libavcodec/pthread_frame.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > It would be nice if a solution to this would make it in 5.1 noone ? i guess the fix will then be in 5.1.1 is there any note / warning that should be included in the release notes or something about this open issue ? thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB What does censorship reveal? It reveals fear. -- Julian Assange --oDT6ON1uLKeoILhE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYtrO3QAKCRBhHseHBAsP q+fSAJ9lNEd6ONUcB9fEYWOzXS3otvCWvwCeMXAQaqsT4J53RR5fGht7taWQH/k= =GQ4x -----END PGP SIGNATURE----- --oDT6ON1uLKeoILhE-- --===============6201562018284068506== 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". --===============6201562018284068506==--