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 5DB9F46171 for ; Fri, 7 Jul 2023 21:31:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8DB7368C6D1; Sat, 8 Jul 2023 00:31:14 +0300 (EEST) Received: from MTA-10-4.privateemail.com (mta-10-4.privateemail.com [198.54.122.149]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6893A68C4BC for ; Sat, 8 Jul 2023 00:31:07 +0300 (EEST) Received: from mta-10.privateemail.com (localhost [127.0.0.1]) by mta-10.privateemail.com (Postfix) with ESMTP id 9309D1800235 for ; Fri, 7 Jul 2023 17:31:04 -0400 (EDT) Received: from EAS-08 (unknown [10.50.14.246]) by mta-10.privateemail.com (Postfix) with ESMTPA id 6D982180021D for ; Fri, 7 Jul 2023 17:31:04 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=lemler.family; s=default; t=1688765464; bh=Nvw+iczDpSShf1aDi9fWPesmWcKyMm6OBT0zTYCLFok=; h=From:To:In-Reply-To:Subject:Date:From; b=C6WNpqL1nxOqwy2oGHlxVC/Dh9ZqmR95OfdxbTCG0T9j0vZIoL7wzIZk43752Sm16 NpXcuHWEnxX2a7aNFJUdVu6NDKqjvvzDCFbmiVb4CwllHgaHccElNIOH+CundECUc0 yx1V97jIoRHX5CkK6KSg1BIbUZyRLaT7syd1cGFxhGjDhWUJ81fsPjuLrQ8PBmyE// R8njppp7X7Q/pUI39ub44VxYcwZlDmIEzVbdv4FK+niIARCgd0Ze+mmjOGlabmQACz dUVW6apAl/MM0Q6rlW/MVrfeTmOiMACDVk21GNREMZIVfFe9OO5BU0uOa1p8hVfpk2 He5Z52inN5vTQ== X-Header: Open-Xchange USM Mailer (USM Version: 7.10.6-4, EAS Version: 7.10.6-6, Build e35e63b749ebb3437d8208dad0793e43aace07d1) From: David Lemler To: ffmpeg-devel@ffmpeg.org In-Reply-To: Date: Fri, 7 Jul 2023 16:31:03 -0500 Message-ID: <1338627269.18082.1688765464391@localhost> MIME-Version: 1.0 X-Mailer: Open-Xchange Mailer v7.10.6-Rev47 Content-Language: en-us Thread-Index: AdmxGNjfoJbNxJAaTMm3jp5EcLW99Q== X-Originating-Client: USM-EAS X-Virus-Scanned: ClamAV using ClamSMTP Subject: [FFmpeg-devel] [PATCH] lavc/libvpxenc: prevent fifo from filling up 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Prevent the fifo used in encoding VPx videos from filling up and stopping encode when it reaches 21845 items, which happens when the video has more than that number of frames. Incorporated suggestion from James Zern to prevent calling frame_data_submit() at all when performing the first pass of a 2-pass encode so the fifo is not filled at all; replaces original patch which drained the fifo after filling to prevent it from becoming full. Fixes the regression originally introduced in 5bda4ec6c3cb6f286bb40dee4457c3c26e0f78cb Co-authored-by: James Zern Signed-off-by: David Lemler --- libavcodec/libvpxenc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 8833df2d68..549ac55aaa 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -1780,9 +1780,11 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, } } - res = frame_data_submit(avctx, ctx->fifo, frame); - if (res < 0) - return res; + if (!(avctx->flags & AV_CODEC_FLAG_PASS1)) { + res = frame_data_submit(avctx, ctx->fifo, frame); + if (res < 0) + return res; + } } // this is for encoding with preset temporal layering patterns defined in -- 2.41.0.windows.1 _______________________________________________ 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".