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 C4FEC45B77 for ; Mon, 24 Apr 2023 09:19:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6839068BF61; Mon, 24 Apr 2023 12:19:21 +0300 (EEST) Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B9A5068AFE7 for ; Mon, 24 Apr 2023 12:19:14 +0300 (EEST) X-ENS-nef-client: 129.199.129.80 ( name = phare.normalesup.org ) Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef.ens.fr (8.14.4/1.01.28121999) with ESMTP id 33O9JEnU000343 for ; Mon, 24 Apr 2023 11:19:14 +0200 Received: by phare.normalesup.org (Postfix, from userid 1001) id F2AFDEB5BF; Mon, 24 Apr 2023 11:19:13 +0200 (CEST) Date: Mon, 24 Apr 2023 11:19:13 +0200 From: Nicolas George To: FFmpeg development discussions and patches Message-ID: References: <168217824856.3843.12078608174603704828@lain.khirnov.net> <2154f93d-aa9-21da-966-a18399b33bf1@passwd.hu> <168224247972.9711.2598182970187678748@lain.khirnov.net> <168224350165.3843.7618353870792865075@lain.khirnov.net> <3587873f-7b50-a98c-70ce-443aeb93b9ae@passwd.hu> <168225127500.3843.6466868436482522174@lain.khirnov.net> <5e23352c-434c-1135-827d-49438c7cf11@passwd.hu> <168228099822.3843.5128524518650472655@lain.khirnov.net> <299fbcbb-5730-f06-8532-ee0e33a1a39@passwd.hu> MIME-Version: 1.0 In-Reply-To: <299fbcbb-5730-f06-8532-ee0e33a1a39@passwd.hu> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Mon, 24 Apr 2023 11:19:14 +0200 (CEST) Subject: Re: [FFmpeg-devel] [PATCH v2] fftools/ffmpeg_mux: fix reporting muxer EOF as error 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="===============0056996374342225960==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0056996374342225960== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5UpXt4cEoFaH2z0d" Content-Disposition: inline --5UpXt4cEoFaH2z0d Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Marton Balint (12023-04-24): > The change in ffmpeg.c "forces" muxers to check if they ever get AVERROR_= EOF > for some real error condition and map them to e.g. AVERROR(EIO). And that= is > an API change. Indeed. And the documentation agrees: * @return < 0 on error, =3D 0 if OK, 1 if flushed and there is no more dat= a to flush * * @see av_interleaved_write_frame() */ int av_write_frame(AVFormatContext *s, AVPacket *pkt); * @return 0 on success, a negative AVERROR on error. * * @see av_write_frame(), AVFormatContext.max_interleave_delta */ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt); No mention of EOF at all. Contrast with: * @return 0 if OK, < 0 on error or end of file. On error, pkt will be blank * (as if it came from av_packet_alloc()). =E2=80=A6 int av_read_frame(AVFormatContext *s, AVPacket *pkt); When EOF is intended, it written in the documentation. As it is, we should av_assert0(ret !=3D AVERROR_EOF) in av_interleaved_write_frame() and fix the possible failures. Regards, --=20 Nicolas George --5UpXt4cEoFaH2z0d Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE6ooRQGBoNzw0KnwPcZVLI8pNxgwFAmRGSZAACgkQcZVLI8pN xgxkZw//Sc/t6eAZCqAq9TLbUVxMvDrr4Seb55M7mkqce/UJZWf4dKAHYe2On2LC WlLI9t6evX9SFvUrWhPguV5XJJOlaaqMcDMk6tiYzujOxbsYk/6B7C9CeCFhhcwO 4QqJDsQl/43ZH7cwtY+ToqByjKrE/hAOU9z76rfgmKxOdDzqwfEB4Lq6BubjzHUV GZ771QeIPU0H9fZzfpNHtSLEu/0i/pnd2fMOXJFtjutTqzTqjnBooNBM/+4Soiku sZo9aiaiVWnLsBF9I5aoDlUX6N3o5e6DLyLeKti4WXA4a0QiHQkHbX6Gz6u2luQm zsW0w1hRgbJf86ufNYXElbvGU7S+rvqnk2PaI7UzfgzDV3s+gPfD+Js0Q9fCB/QQ MbOQ8DPc94/TBNZIc7rwoFD8EEHkLU75S3KdJKvWsMBb2E5RIBURK+yLP49Rkiy7 pqGPIybokwCW4nYZdtd9Qreh/8SUFZR9aSSlM5layh00oec0MZot78gVu7IPNvY8 haP18ariuZQTb+gSNRZ87aU4pSpjMoH1YeJKoW+CdapmZlcXaBpRmOA5wRcsDwJz RFnd22e7gm3Ownn854apscC4LX2+6ajnMs27N44q2NMnK5wdKHBm1xElGBAU03PB JwbZOU3jaCqSjtLjwG2/jJ7SlOrd5Es0sQE6ky8cQzsFub+1KYE= =8aNU -----END PGP SIGNATURE----- --5UpXt4cEoFaH2z0d-- --===============0056996374342225960== 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". --===============0056996374342225960==--