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 43E1244E28 for ; Fri, 26 May 2023 19:56:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3897F68C1C7; Fri, 26 May 2023 22:56:42 +0300 (EEST) Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F354C68C0AE for ; Fri, 26 May 2023 22:56:35 +0300 (EEST) Received: by mail-oi1-f171.google.com with SMTP id 5614622812f47-38e04d1b2b4so678785b6e.3 for ; Fri, 26 May 2023 12:56:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685130994; x=1687722994; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=nnhaFsXMIuIMFQyCTzKkpg9jST8r4fcfOjTIpgd4kJQ=; b=Vg54J3W4QTE/bAyOOKAvcSQomPd5WojhvWJ90lwsxhOG54wMBtmvbwNlJZLW0HQjsL VjMyLYAL1Z/kAFQN9fa8DH0782urDCtqs45v7nDSKAEHxHV25xujty3rO8k4kQIG6Zax wF43UhFOvRCNVmz1mZFXNboVGxCyZvWqXE9Qku9WtkZXUE3wKP2hLQFTcYD+j6BcvC1q HwxRcp7axzBSqZTActoOKxyMYgJ+/Ne3w/cTbyG2HJLlijHx9gi8epqudOlpX6ajlJts tGuROGqMFhnZ+XZErluf+5Da4cD0BzS6ONy6+Kdkn9BJ6YlKsBFdykh+ZJEJ/WxVujgx KyvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685130994; x=1687722994; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nnhaFsXMIuIMFQyCTzKkpg9jST8r4fcfOjTIpgd4kJQ=; b=QZHAVYt1NdxfBTX6JSDA3+igFRcR7DiTrA/8C+aZrvOiVENgTcWeuZHUnnXYeDf1Sl YGcaHzyMvrEPCc2s0NLxseDGpN4QUImPwzwFznQ4qiAf9Zn2xMaHF/S0YEH3zsvVAGme Rf0nsWCvmiaG8swB9NkL02wELkIypMJpaZipl0JSs6I34pSe9KYJsxGJErxKMPWNeTXi sHdLS4ppJYZZ8imfhnslW10+IGw4X/ZB2NG/hA660NqkuUW7P7meWHA510boHbCOBnYG 9nMW3I+tApR30vuBg3WwhYSfRJJ5/gSdw3HV1n2Gzy2cJhuI1OYnMTDW69Cbk3ik/eYc XgSA== X-Gm-Message-State: AC+VfDxgbHa8noPpl2VfwSFSy0RviZcnw9bUGu56NcjjolfbC5VWhfL6 ihLQsPiCX8IHPTPr2DQVL9VTGn5J+P4= X-Google-Smtp-Source: ACHHUZ6W7ifnFjqvju1d3Ys7HU3bBcClh+MJ9x7v8mhg819fvwzRH0A4YamJbH5xVkc0djUF14lBdQ== X-Received: by 2002:a05:6808:130c:b0:38c:c177:a6bb with SMTP id y12-20020a056808130c00b0038cc177a6bbmr1737136oiv.23.1685130993847; Fri, 26 May 2023 12:56:33 -0700 (PDT) Received: from [192.168.0.12] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id d7-20020a4a5207000000b0055554a51353sm2002141oob.1.2023.05.26.12.56.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 May 2023 12:56:33 -0700 (PDT) Message-ID: Date: Fri, 26 May 2023 16:57:01 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 From: James Almer To: ffmpeg-devel@ffmpeg.org References: <20230522221826.3124-1-jamrial@gmail.com> <20230524113154.1508-1-jamrial@gmail.com> Content-Language: en-US In-Reply-To: <20230524113154.1508-1-jamrial@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_dec: abort if avcodec_send_packet() returns EAGAIN 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 5/24/2023 8:31 AM, James Almer wrote: > As the comment in the code mentions, EAGAIN is not an expected value here > because we call avcodec_receive_frame() until all frames have been returned. > avcodec_send_packet() returning EAGAIN means a packet is still buffered, which > hints that the underlying decoder is buggy and not fetching packets as it > should. > > An example of this behavior was in the libdav1d wrapper before f209614290, > where feeding it split frames (or individual OBUs) would result in the CLI > eventually printing the unuseful "Error submitting packet to decoder: Resource > temporarily unavailable" error message, and just keep until EOF without > returning new frames. > > Signed-off-by: James Almer > --- > Now compiling. > > fftools/ffmpeg_dec.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c > index e06747d9c4..b1db9b30d0 100644 > --- a/fftools/ffmpeg_dec.c > +++ b/fftools/ffmpeg_dec.c > @@ -390,6 +390,11 @@ int dec_packet(InputStream *ist, const AVPacket *pkt, int no_eof) > if (ret < 0 && !(ret == AVERROR_EOF && !pkt)) { > // In particular, we don't expect AVERROR(EAGAIN), because we read all > // decoded frames with avcodec_receive_frame() until done. > + if (ret == AVERROR(EAGAIN)) { > + av_log(ist, AV_LOG_FATAL, "A decoder returned an unexpected error code. " > + "This is a bug, please report it.\n"); > + exit_program(1); > + } > av_log(ist, AV_LOG_ERROR, "Error submitting %s to decoder: %s\n", > pkt ? "packet" : "EOF", av_err2str(ret)); > if (exit_on_error) Will apply. _______________________________________________ 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".