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 8D39F4B5D4 for ; Tue, 9 Jul 2024 12:40:53 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4F74C68DA28; Tue, 9 Jul 2024 15:40:50 +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 A69DB68D8D1 for ; Tue, 9 Jul 2024 15:40:43 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id DA9C9240008 for ; Tue, 9 Jul 2024 12:40:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720528843; 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=7eCaSB9gtzI7thVDvFxmzr2Db/Km5yWZrd87xPMA3Ss=; b=fGo6h3D0Vskti5zdnQepU4LcOQKQheMxgr0sjQ21SjW6fgbXhjVsK3cmwjXi+qeWDGRYLe kTLCTJUHSjOdlDF8zfc75BH+2WxUy40XXRN1+hgivXUBVLUX/qFZWMgDFuGWO2u1BzXhto BXer6ac0GFel2skNX9KbeUFPV37+5r0c/bAN16SIbpG8gL59OIY20X8mELfgUx6XsMozwv O5X80GjF3ejNKslulDrU9vKKCr/7K7qhn18GX2dWZNQI7mD4Iv7mRf0KXRE2b2WatKBVaC 8ir2/ZXLi3VKp0vmNKgInDPoywfhxdwMNpuL86bVUYKGNfEyA1xtp+/BLr0bkw== Date: Tue, 9 Jul 2024 14:40:42 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240709124042.GU4991@pb2> References: <20240701234733.3829130-1-michael@niedermayer.cc> <392405498e8432512587b824a6fb8184bac94bc6.camel@intel.com> MIME-Version: 1.0 In-Reply-To: <392405498e8432512587b824a6fb8184bac94bc6.camel@intel.com> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH v2] doc/examples/vaapi_encode: Try to check fwrite() for failure 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="===============5023301964425213010==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5023301964425213010== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="W1bsJunjDgiRrlq1" Content-Disposition: inline --W1bsJunjDgiRrlq1 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 09, 2024 at 06:14:17AM +0000, Xiang, Haihao wrote: > On Di, 2024-07-02 at 01:47 +0200, Michael Niedermayer wrote: > > Fixes: CID1604548 Unused value > >=20 > > Sponsored-by: Sovereign Tech Fund > > Signed-off-by: Michael Niedermayer > > --- > > =A0doc/examples/vaapi_encode.c | 4 ++++ > > =A01 file changed, 4 insertions(+) > >=20 > > diff --git a/doc/examples/vaapi_encode.c b/doc/examples/vaapi_encode.c > > index d5f472f6dd8..ff3ebb1e2b8 100644 > > --- a/doc/examples/vaapi_encode.c > > +++ b/doc/examples/vaapi_encode.c > > @@ -88,6 +88,10 @@ static int encode_write(AVCodecContext *avctx, AVFra= me > > *frame, FILE *fout) > > =A0=A0=A0=A0=A0=A0=A0=A0 enc_pkt->stream_index =3D 0; > > =A0=A0=A0=A0=A0=A0=A0=A0 ret =3D fwrite(enc_pkt->data, enc_pkt->size, 1= , fout); > > =A0=A0=A0=A0=A0=A0=A0=A0 av_packet_unref(enc_pkt); > > +=A0=A0=A0=A0=A0=A0=A0 if (ret !=3D enc_pkt->size) { > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret =3D AVERROR(errno); > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 break; > > +=A0=A0=A0=A0=A0=A0=A0 } > > =A0=A0=A0=A0 } > > =A0 > > =A0end: >=20 > LGTM will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No great genius has ever existed without some touch of madness. -- Aristotle --W1bsJunjDgiRrlq1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZo0vwwAKCRBhHseHBAsP qylUAJ9yWsG20i9/+Gy3RpOCEwz1p+fI3QCeK2afTpdntaqlEDLCXof+FdHPnfQ= =Vkdn -----END PGP SIGNATURE----- --W1bsJunjDgiRrlq1-- --===============5023301964425213010== 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". --===============5023301964425213010==--