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 9695E40342 for ; Mon, 20 Dec 2021 14:32:14 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 728B068AE46; Mon, 20 Dec 2021 16:32:12 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 15FAD68A50C for ; Mon, 20 Dec 2021 16:32:06 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id A686024017C for ; Mon, 20 Dec 2021 15:32:05 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id fB_mmLcmb60p for ; Mon, 20 Dec 2021 15:32:05 +0100 (CET) Received: from lain.red.khirnov.net (lain.red.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.red.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 2014D240179 for ; Mon, 20 Dec 2021 15:32:05 +0100 (CET) Received: by lain.red.khirnov.net (Postfix, from userid 1000) id 2D73816008E; Mon, 20 Dec 2021 15:32:05 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20211220105021.GQ2829255@pb2> References: <20211217215155.19805-1-michael@niedermayer.cc> <20211217215155.19805-4-michael@niedermayer.cc> <163999391652.13029.15771139919327877252@lain.red.khirnov.net> <20211220105021.GQ2829255@pb2> Mail-Followup-To: FFmpeg development discussions and patches Date: Mon, 20 Dec 2021 15:32:05 +0100 Message-ID: <164001072509.13029.15596413999190684225@lain.red.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 4/4] avcodec/tiff: Use ff_set_dimensions() for setting up mjpeg context dimensions 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: Quoting Michael Niedermayer (2021-12-20 11:50:21) > On Mon, Dec 20, 2021 at 10:51:56AM +0100, Anton Khirnov wrote: > > Quoting Michael Niedermayer (2021-12-17 22:51:55) > > > Fixes: OOM > > > > This is very non-obvious and could use more explanation. > > I guess its obvious to me as ive seen this bug more than once > the problem is that directly setting width/height leaves > coded_w/h unset, then something sets coded_w/h and next time > width/height is set again it is unrelated to the still set > coded_w/h and theres a FFMAX() between coded_w and width > so the image allocated is much bigger > ff_set_dimension() breaks this chain by setting both width and > coded_width > > should i add this long explanation above to the commit message > or something shorter like > "sets coded_width / coded_height too to keep them consistent with > width / height" Either is fine with me. -- Anton Khirnov _______________________________________________ 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".