From patchwork Sat Nov 18 08:03:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 44709 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6a89:b0:181:818d:5e7f with SMTP id bi9csp408610pzb; Sat, 18 Nov 2023 00:03:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IH1bmFDLdYxD5tvqvS4SeRQa/0Q78eKUqZqQ8kDWRQst2ezAUBrbNiX7GH76E//dnBItyTs X-Received: by 2002:a17:907:77d3:b0:9a2:28dc:4166 with SMTP id kz19-20020a17090777d300b009a228dc4166mr1246390ejc.75.1700294619843; Sat, 18 Nov 2023 00:03:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700294619; cv=none; d=google.com; s=arc-20160816; b=E/ofYPt1JQ9zBNgVRGUUCcMxE16h4AZw7mgRFsd8xf4QfV2IA13qstnCjT7j2IUEs+ diQeYxmFlxTv7LL8CE1yeSrpjA37jhJ1FaxgJOOi/WYWsoHsAdXdXBL0FNDxcl6a6xZl jPGZrSldPFCsLVNzBjXVrMATjuZTZu1MhflG+c6/HqKKNgcuhkGLkMrTDAsSsGv3t5wY zzBde9zmSfqmJwPmj0chXZMdDsvGxBwhDPnS9RaZA+hquBX/giQbOPeW5KLpSLbio8mQ qqPfWAE+A5jnuBD2X2RCNO0n9QeXcphNH0rBE7V1EwPFOAgWpf569ZIQk1809i5g2ibI qtsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:date:to:from:message-id :dkim-signature:delivered-to; bh=Y8b4wvRpnGNnHeU6TBGyXgSR2P/LjDqgcPjmawb9j2c=; fh=HnHYuZ9XgUo86ZRXTLWWmQxhslYEI9B9taZ5X1DLFfc=; b=ZzK8+jDb0DNMAj+1Oy299tByhmLYYj1q94OgOKl+9SBvMAktRVJdRne2YdbDA+bBUO cEKUHIyXBU3+yWY2yocCSDrJqjvt0BAdyCh0rSqKLThC4MFSohD4caqYpsls7i31jl4y Zr9OgXTVU0jc3lmQkjpZ8fLJq4K2lx7ReQeCoBWoIqzyzHY4eJ5JWaEY8tcQfkHSuA13 /d3SLX9KuNORRGxb/g0Pzfy/ELFHqzNCvwcLWDia+Aw1aGDTr3KEYDuVsib5sueH93VV 8QYhVJsowOnh/rZKukcRx+0yDEVGapGSQbcDuNHWJNr5HF81hCWjASJ4j6XAQEYcgGRI KK6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@foxmail.com header.s=s201512 header.b=PpYAerdV; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id l20-20020a1709065a9400b0099d8822862bsi2075842ejq.54.2023.11.18.00.03.38; Sat, 18 Nov 2023 00:03:39 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@foxmail.com header.s=s201512 header.b=PpYAerdV; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A668268CD10; Sat, 18 Nov 2023 10:03:34 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out203-205-221-235.mail.qq.com (out203-205-221-235.mail.qq.com [203.205.221.235]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B2EBE68CBC7 for ; Sat, 18 Nov 2023 10:03:26 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1700294596; bh=+4qtQTN2c/Bb4tVvB/U2zAIayKKEjzln6yYRDYOsjAA=; h=From:To:Cc:Subject:Date; b=PpYAerdV5M7h3ay7XqscExqm/dmp65piH5z2jEW0ubcdXmTv+1tLODvnclh3pxttt MRCfow8CBlF9AnYr56hJmQr0bErFS4didd8ycx9k7rv+lMimp+itdoyXhGOMFPnKmA qlGiO6x5ElHchVWPyuV99UkWuakrPle0awq97O9k= Received: from localhost.localdomain ([121.34.201.196]) by newxmesmtplogicsvrszc2-0.qq.com (NewEsmtp) with SMTP id CF8B453; Sat, 18 Nov 2023 16:03:15 +0800 X-QQ-mid: xmsmtpt1700294595tvayjm65h Message-ID: X-QQ-XMAILINFO: OIERQVU0SLUZ5olsCQzC7w602FZPyr9AZNuKDzv64MQRL+fWg+6L4RU53fO6yZ KEt+H6Y5WSoBjC1zQ1l7uxfKmNwnm7ggMRzj09bQoE8WRWztGTMqRXLDiKIsdbNV8AfGhDfR/2vw +I7fbxRrHVNzcYue1j2wLK7B3VXmR3lcpxoy4DV7ax8gtEurPhyfTeR81HAQ+3HcXGaXfLWZwsG6 XcmoXje6hD9O0eh80XnN19LSbD0LuNlY2fj8IiizEySs9JPO6de6Jwo7t2r4UHiNL0Ju4pXqVmI/ GYZjGULRqluWqlfyFE9DNHqTkd9WkGb+2MNKrX2mypkjTcNIMfs3bJEkf6z+R1/nfAaT1plwA451 0ZoT8+yE47Lla8x1wlC1sCtKgemWUZ/LIBSrR4ZKFq4e6/OKECFNyaEm+vPksoNfvyCidks253Xv 1V/lxbfgNfBGkwK36VVHBzHeqkMgWJy3h4ap6u0DYTk0hlvMkQH796/9z+Z5R3lCt6upvKCzOCTg xXZtU/NJl2DPVABG2Hh+Idh7u3O/U/x5udeoiKBTdX9KE4F/aJFgHw5SzpN4+LggSaEs0NVJH1Kc vxICXx/cteWYDMPJliqgZraLI7luZhZkiyyJ+cVIz8+WRsqC0wMr2Cl+b/p0L8M+o+WaCYZc4xwD 4fgqfOzMwUvRmqrAdI+ii2tgXZghL7YUNlR6bL5ZLtlDJAoofSGyjndiBUlUH8EHtaEsGWiNZa48 Ibs+TmYw7wxp/e4pX5uQv0QaqPH3X/f2C97AoTc2IykvvY1snjyzihKnS1jYdS4OphKPyW8Tej/A P5nHdYtb/Lu7MUhlYmM5fSSZzomFUU2csTaR3eFCTOZF/G7l+jtTc/ElKtkwZKCiCm4bN0/Tev5P tALtDVEduxKFGjkAr9GOAVspOy9uNCINYsf7iTiBklVfDFaD+Bmlm7z936aswpE1E9QMTyccly7A Rl43xuBq3LAY7BnIMWZ2Y6pP2J4UaQ X-QQ-XMRINFO: Nq+8W0+stu50PRdwbJxPCL0= From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Sat, 18 Nov 2023 16:03:11 +0800 X-OQ-MSGID: <20231118080312.657877-1-quinkblack@foxmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] avcodec/mediacodecdec: fix return EAGAIN after EOF 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 Cc: Zhao Zhili Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: G1IB443TIQiZ From: Zhao Zhili Signed-off-by: Zhao Zhili --- libavcodec/mediacodecdec_common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mediacodecdec_common.c b/libavcodec/mediacodecdec_common.c index 1151bb71f9..d6f91e6e89 100644 --- a/libavcodec/mediacodecdec_common.c +++ b/libavcodec/mediacodecdec_common.c @@ -804,6 +804,8 @@ int ff_mediacodec_dec_receive(AVCodecContext *avctx, MediaCodecDecContext *s, return AVERROR_EXTERNAL; } + if (s->draining && s->eos) + return AVERROR_EOF; return AVERROR(EAGAIN); }