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 A97244C0CC for ; Tue, 2 Sep 2025 12:23:22 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'JecmDC/cd+lrNmXcCQN63sJ8z0gSpBUfnsA7SfHnCZU=', expected b'I7LESCGfgyF7ai1swrB1R85pNo8PU14UW/OpTEysz80=')) 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=1756815794; 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=0uB3ljFOY2LvkPunW+v6tDTwPxLoqm8zmCJUk+anvkI=; b=IhSAJqv4tz2LplVm78xv215DVZBY+qk58uG3zBwCGQoDIYhPpwQZsFm4J7Z08/MOX4B6t 98qnFxIYEC2yYxLtRILnTTQAvh0ICeuvmqy+8aoccqgldLXMEFJYNrmSVDLnN2tbu93SuuP gurOeT0TDL4pbKMgPzorDpwU0wunMZdf2BswiNpLQ/ipI9T4RaqCpEcm/+BQk+3+WiSRSjF S+qANgkmKNJckhFd+rPHU54YU1t686ALYSYFLwmJk9Tvx9MGp4Sf9+fYkNb7w4Pi00h2J/5 bU+/ES4AEIK5Q21GzrueCKhPRooPTrajGtbuzt8RkpOz/M3ae2+c6Z7iy+Gw== Received: from [172.19.0.4] (unknown [172.19.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 85F6668E791; Tue, 2 Sep 2025 15:23:14 +0300 (EEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1756815785; b=cIsMYchwY88IzjRMj4ERpyJvwCIuP3AYXAAFlCHOBCg20wCUsW/DU7bCmdIq/ESRyyjwx 531MK0U1IeVY33wKSXQDcbqzia1NoyW1SjQKA3y2S5zJ8ZuVjQH7DKJcxye4i94dL5HZ/nv +KaFhYIZap19B608ElHXMNP9bQuyUyu/2eTQbr1G1ZOVqjGYII/1VZckWzHLF9leMLnUWPs gX6ifsyT0C/emI6jfCcAvBpws4V7lX68fy4mirTXFUknm+VGlSZLkz5bYXZtwE2/T57O0hB /JXkbRQGC0XJP5TQj+D33ttGW/xxuxbYcup3ma2US3I83oRLZZ5xYFBGorIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1756815785; 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=JecmDC/cd+lrNmXcCQN63sJ8z0gSpBUfnsA7SfHnCZU=; b=QGu+VFQPKDwEKCM+WEa41R/jXE8jzpMKT//K5Ar1/W4ycaaV5Zqw9mONuFtUHPzif/y7M nW3YwK9blzPNbSdEYsJqd37CNMlqu1uOXcD0tnekjIkta/oRYoKCCcIU4zb0OYBsvGE/Mky uJl/FMBBzzbC5piUaOQ7/nDbcnRzJpN2+wSRHsfRTk8ecudnmJtD+5e7BMDYfmBwsu9M/Vv HnTbtvMvJafwdHlnh8FqvE6AJEgs1M9A/ZDdCenwuQgtIXxi1lRL7tpfSSbtlo06nc/olrj IBQVYnjoehr4Nc6D2hbugNRkqc7EIXrd7gcFHtHJQCHcNgxUwOQOaYMnVs+Q== 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 relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 306B668D449 for ; Tue, 2 Sep 2025 15:22:51 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7A6C11F74A for ; Tue, 2 Sep 2025 12:22:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1756815770; 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=I7LESCGfgyF7ai1swrB1R85pNo8PU14UW/OpTEysz80=; b=ZGsjCB7BsCkQlEFuJNtMbiJrjYk/xt+0A8eZFh8TnwER4y60Tzj25PlJ89MWNgrGV3i4Am 67yhWtifzafOKe4mx7ZxyAqsmaAzZ8SMPY+WAPYCKr0z5tIjitUgOb7OOBVe3JQFk5AesA 7CF6VME0Y8TH8BIjJFwHH5nSA1c2A841xENfo+epQD506j6YEQmGgNy53PXxAkKzAS6UQC ErsgUCbFffjnN3df4cNic6tuwT9OXIK5EUBeuKeLKuku4Dcpc7DXipvLSkuZEoxO/gMQQW +sVlnAeQqeNzDcV2BaJJFYlweoO+fYWMqD1mUpWNN24LjmAsvUMcftKc+XvRJw== Date: Tue, 2 Sep 2025 14:22:49 +0200 To: FFmpeg development discussions and patches Message-ID: <20250902122249.GL29660@pb2> References: <20250828185816.2807112-1-mail6543210@gmail.com> MIME-Version: 1.0 In-Reply-To: <20250828185816.2807112-1-mail6543210@gmail.com> X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepieegkedtjeduffejhfetgeejtdegteetgfegtdfhjefgvefhteegkeejtddvhfevnecukfhppeeguddrieeirdeihedrudejieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeihedrudejiedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Message-ID-Hash: 4GGNYH4PP4IIZUZPXWSBMHDTM4XMKJ3G X-Message-ID-Hash: 4GGNYH4PP4IIZUZPXWSBMHDTM4XMKJ3G X-MailFrom: SRS0=z6IW=3N=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] fftools/ffmpeg: fix gracefully shutdown 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="===============0857538470621951026==" Archived-At: List-Archive: List-Post: --===============0857538470621951026== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ka7Iqb43q65ZDkYm" Content-Disposition: inline --ka7Iqb43q65ZDkYm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Patrick On Fri, Aug 29, 2025 at 02:58:16AM +0800, Patrick Wang via ffmpeg-devel wro= te: > d119ae2fd82a494d9430ff4d4fc262961a68c598 removed the loop-breaking condit= ion > received_sigterm. > Thus, signals no longer gracefully shutdown ffmpeg. >=20 > Fixes: #10834 >=20 > Signed-off-by: Patrick Wang > --- > fftools/ffmpeg.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c > index de607cac9..cd3894341 100644 > --- a/fftools/ffmpeg.c > +++ b/fftools/ffmpeg.c > @@ -806,8 +806,6 @@ static int check_keyboard_interaction(int64_t cur_tim= e) > { > int i, key; > static int64_t last_time; > - if (received_nb_signals) > - return AVERROR_EXIT; > /* read_key() returns 0 on EOF */ > if (cur_time - last_time >=3D 100000) { > key =3D read_key(); > @@ -891,6 +889,9 @@ static int transcode(Scheduler *sch) > while (!sch_wait(sch, stats_period, &transcode_ts)) { > int64_t cur_time=3D av_gettime_relative(); > =20 > + if (received_nb_signals) > + break; will apply without the tabs thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Awnsering whenever a program halts or runs forever is On a turing machine, in general impossible (turings halting problem). On any real computer, always possible as a real computer has a finite number of states N, and will either halt in less than N cycles or never halt. --ka7Iqb43q65ZDkYm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaLbhlQAKCRBhHseHBAsP q3swAJ9Cxv7yBz2eqx023DQLeKG2KTvhcACgjO3oNIdOscUME7jyAz32pdKXAV4= =tFh7 -----END PGP SIGNATURE----- --ka7Iqb43q65ZDkYm-- --===============0857538470621951026== 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 --===============0857538470621951026==--