From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id AE3814DF88 for ; Fri, 9 Jan 2026 01:55:35 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'jk7q9Hm8qjHjZup14Rt9ASklawvtDrQQfXDl+ckJins=', expected b'gBk+filERXHWMYZSuXT5GrINyRtxNtsTVY15cvzDmtI=')) header.d=niedermayer.cc header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1767923725; h=date : to : message-id : references : mime-version : in-reply-to : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : from; bh=I7v6ya8eB21oFkU8J35snuV/rGLvOMPlVGoYdmlwmkM=; b=vF7f1cXo2bpfdTyILaj7MDVcL36jd/wVcha9a2U3LgUQ0ido+FxAu9keKLGBvHhjh1rag qx7zXFCkoBt6vTlpZA2daVTHfyKXnf5yNI4GE92XUQurkLsvHhuKPmd9UYuXW7t/3yl3rO0 rQdSfJnOvWrbHAZwm6Z/2+IellmWqGj+mRBp3FqyNfwWJaDNWsC5S7X/J53t+hYzeOSCTbh kt/PFz2qB3O79tId7wNBaWBHyewJuGBFu24BvLCVHyEOYwkw37mulN0cknKVDrh5Z5kNWQW Qn8A2RUDGg8eU1vi5sEksQbUAfRRlOwnLUsscBXJdqDmRQ7sjN0dUmao1sjQ== Received: from [172.20.0.4] (unknown [172.20.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 7B4E1690DD0; Fri, 9 Jan 2026 03:55:25 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1767923708; b=YbVN4FxrxMHd0O/KQTjmDmOWn7Gx+9PJd/vlrRuC3hmgp9yHzyEKTdMMwr2b87FqHWRt1 voLbalTpR5yqGzTtNBPzacsBgM53/88F+592cBasJ5ZT75fUlZc906HDQA4DdkasssI2kNh BYm1yvuq8aGD2zpyoFJ+tuHkWKpMSk+yWoAT5kok13cjP6K5sX7e5zHpXOXQ1KIgEZLy03+ HgmWaH6hzaiwO0PRk52u2sTr+CPHGaTg6rBWThva7m7neIjpL+LzUoCbD8LIC9KzSX46Reu fe4+SmzAsL3YoRVTRA1hE9xlm/KX2POk0JkAitUrLv6y3q5WXwt/s3hASdEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1767923708; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=jk7q9Hm8qjHjZup14Rt9ASklawvtDrQQfXDl+ckJins=; b=HtOuZfvxnGHhWBqWRqk0zzrMpey29nNPIO9a6aWlvBQOIXZfss4pEkbY/ROoKXBelODci rcxG3Xt6FZN8vPbNhYbsFvE//8xzsxr+6Wbb1S3TZXYDBZjxDb6wQ9Z/puVwAO7RXvBfOOs 8HM3MrWP/ELewB+LjbnXEvZgfFZmBNnPSR8q0X4/eGyaqARstZ2g+uV4EyifctTJdQ0QgjG VCCv+7xz/9smIUiFcxlKD+rKclzytpSNUy7M3syPajrFLMC+9TBz8/53jbRtY9C4JVVUJqp izIPGjSJkR3RIR+LOmXu+W8gs0f6VgS9fTQAZ6TzuG4YeIo6ev2xxMhmg6Og== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=niedermayer.cc; arc=none; dmarc=none Authentication-Results: ffmpeg.org; dkim=pass header.d=niedermayer.cc; arc=none (Message is not ARC signed); dmarc=none Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id B0E50690C13 for ; Fri, 9 Jan 2026 03:54:55 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id F15A142F5F for ; Fri, 9 Jan 2026 01:54:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1767923695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gBk+filERXHWMYZSuXT5GrINyRtxNtsTVY15cvzDmtI=; b=cK1rHo+as2ZjyX+LZDlfU3f/OKelOxN4ZKhNXEf1aEP/Y1ikeXBNOCEvurSH+DjQr5wV1o FoKlod/lScLL4Q0ADaRwxuETUwXmuawgWOc7h+OKM5JCzYNgH2BobqRln5druUmYKHDbDY awV27pxkRFxMP2hZ6qJ87PMqApM90KndM4fJhVrxkKuzVTTy28AteffNNQSCSfag6zf32n 13pdPXGpi7Y07N1yLkWG7plDkDzn4oBCVhJR4Pz3i2v2aeKfvR86rZAtajNvccv3xK4WBp JZwLW3XbhS2zxDDAVMTGGz7tvcf54Bwn+9d5FkH5bOVgfdA5cAisA7VhypPaug== Date: Fri, 9 Jan 2026 02:54:53 +0100 To: FFmpeg development discussions and patches Message-ID: References: <20260105011147.752-1-monsterbat02@gmail.com> <20260105011147.752-6-monsterbat02@gmail.com> MIME-Version: 1.0 In-Reply-To: <20260105011147.752-6-monsterbat02@gmail.com> X-GND-Sasl: michael@niedermayer.cc X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddutdejheeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeeigeektdejudffjefhteegjedtgeettefggedthfejgfevhfetgeekjedtvdfhveenucfkphepgedurdeiiedrieeirdehtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeiiedrhedtpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpqhhiugephfduheetudegvdfhhefhpdhmohguvgepshhmthhpohhuthdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg Message-ID-Hash: 46T36VEGSWFJU6HOLW6HLAVUV4BCHMF5 X-Message-ID-Hash: 46T36VEGSWFJU6HOLW6HLAVUV4BCHMF5 X-MailFrom: SRS0=t8x0=7O=niedermayer.cc=michael@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] Re: [PATCH] doc/examples/transcode: fix memory leak in codec context initialization List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michael Niedermayer via ffmpeg-devel Cc: Michael Niedermayer Content-Type: multipart/mixed; boundary="===============3456251678818468700==" Archived-At: List-Archive: List-Post: --===============3456251678818468700== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="63oU2FNhg0yEb6bH" Content-Disposition: inline --63oU2FNhg0yEb6bH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 05, 2026 at 02:11:46AM +0100, 0xBat via ffmpeg-devel wrote: > Call avcodec_free_context to release memory if parameters cannot be copie= d to the context. >=20 > Signed-off-by: 0xBat > --- > doc/examples/transcode.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/doc/examples/transcode.c b/doc/examples/transcode.c > index 1dc1b50502..2bbe091b94 100644 > --- a/doc/examples/transcode.c > +++ b/doc/examples/transcode.c > @@ -94,9 +94,9 @@ static int open_input_file(const char *filename) > } > ret =3D avcodec_parameters_to_context(codec_ctx, stream->codecpa= r); > if (ret < 0) { > - av_log(NULL, AV_LOG_ERROR, "Failed to copy decoder parameter= s to input decoder context " > - "for stream #%u\n", i); > - return ret; > + av_log(NULL, AV_LOG_ERROR, "Failed to copy decoder parameters to= input decoder context for stream #%u\n", i); > + avcodec_free_context(&codec_ctx); > + return ret; > } Does the indention look correct to you ? Also can you explain what you are trying to do with the av_log() change her= e ? thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No human being will ever know the Truth, for even if they happen to say it by chance, they would not even known they had done so. -- Xenophanes --63oU2FNhg0yEb6bH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iFwEABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaWBf7QAKCRBhHseHBAsP q5EPAJUVms+lqPjECxsI6Neht5xwPB4vAJ9M7mysklAIUZlAa0E9Nextt76uvg== =eNrm -----END PGP SIGNATURE----- --63oU2FNhg0yEb6bH-- --===============3456251678818468700== 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 To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org --===============3456251678818468700==--