From patchwork Tue Sep 5 17:19:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 43562 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4f16:b0:149:dfde:5c0a with SMTP id gi22csp1997094pzb; Tue, 5 Sep 2023 10:20:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGMTq9tz6qzGNiB2jSqclD0PdhF6ByUkn68uP6YCAoU4Et+RyhemrdfHGJ7f5vqZZPT8cea X-Received: by 2002:a17:906:53c6:b0:9a1:bf28:ae9b with SMTP id p6-20020a17090653c600b009a1bf28ae9bmr365919ejo.22.1693934414467; Tue, 05 Sep 2023 10:20:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693934414; cv=none; d=google.com; s=arc-20160816; b=IYhI4C8SK5PZNGOP2HNhvqYlklx2Lhv+GixJGBmAoCndhubZQvyl5EX7R/a60sntg0 W5rtj7GRv9AozNXqNde+Y7IkRaW+e2QcTMAYi0BPqUzRr+uxnsQ8J7dPIdscRHrN1H2b VL2N4R4POqDHsUkAQn6pv29TLyXrEGxviuxbpydZJuhRNKQS27UnEXWBFQFEv7tqc+8Z U7EQ7F3UAulMJcUCcDqudRBfU3uZ5vYNTTgRSqiqtY/iO53I1AkNfe8vlJaCw30igLlv POucPZ21qcKOob54cW65yVWmmneTghQyOU9vF3/PIbdn9JediXKiOfHJ4rd8hjojv1jW 9ZaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=jz2yeT2eOYOt+IDeGtaPuljHdiTf4mkNrVBhfg6rEIM=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=IguJo13Coc+It10QdU9VjVicLFDvrtcsBUuM74c1JKZOOVPuKzA8CgYcTAtNy+Uvtg e0s36NDUwWQZC4l2NYBPTeMTftJP/uIJjoay7/wu0YZzgAlX5+DMbhpFmGSPNT0gJjbT dScwbkt+GW5vspqDDR5M9/ydVAHVcyLZK8kYXWNVYMqXuIk4f1PZdnNe8kzwKpH30cjZ CgFmXXlFfxBq3r0PicJFq2Td0nCllgTFex8DJaVFbHwj0FTsf7BV16XnG3gCI+qvYRq4 lj6xc9fT9wSAss2IX6+PbdMj6bJ5czgNh0LwbLUYgqYyT0HZedlUpCNTkFvOn1fcCS4m 98cA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id md13-20020a170906ae8d00b0099845f657a9si7508999ejb.662.2023.09.05.10.20.13; Tue, 05 Sep 2023 10:20:14 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2292C68C7F0; Tue, 5 Sep 2023 20:20:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4E3C968C652 for ; Tue, 5 Sep 2023 20:20:04 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id C800824018E for ; Tue, 5 Sep 2023 19:20:03 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id hv8aNgdhPcly for ; Tue, 5 Sep 2023 19:20:03 +0200 (CEST) Received: from mail1.khirnov.net (mail1.khirnov.net [IPv6:2a00:c500:561:206::5]) (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 "mail1.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 0BB56240177 for ; Tue, 5 Sep 2023 19:20:03 +0200 (CEST) Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id BB7694170 for ; Tue, 5 Sep 2023 19:20:02 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id 86CCxMV6V4yX for ; Tue, 5 Sep 2023 19:19:58 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (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 "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 1DCA915E4 for ; Tue, 5 Sep 2023 19:19:57 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 28FC43A0212 for ; Tue, 5 Sep 2023 19:19:51 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Tue, 5 Sep 2023 19:19:50 +0200 Message-Id: <20230905171950.19810-1-anton@khirnov.net> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] fftools/ffmpeg: do not fail on AVERROR(EAGAIN) from choose_output() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: zPu61WBnwMhN This is not an error condition, but would be treated like one if the program terminates on the next transcode loop iteration because of a signal or keyboard input. Fixes #10504 Tested-by: https://github.com/0Ky --- fftools/ffmpeg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index f1c5f40caf..fd2ce1c2d0 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1196,6 +1196,7 @@ static int transcode(int *err_rate_exceeded) if (ret == AVERROR(EAGAIN)) { reset_eagain(); av_usleep(10000); + ret = 0; continue; } else if (ret < 0) { av_log(NULL, AV_LOG_VERBOSE, "No more output streams to write to, finishing.\n");