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 485E645689 for ; Tue, 18 Jul 2023 22:00:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BDC7E68C5BB; Wed, 19 Jul 2023 01:00:56 +0300 (EEST) Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6547268BFF5 for ; Wed, 19 Jul 2023 01:00:50 +0300 (EEST) Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-635dbfa710dso32876636d6.0 for ; Tue, 18 Jul 2023 15:00:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689717648; x=1692309648; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=c9RbE1RpNP6V9cJ29iFty6veB/Yh7KHZ7AHgbFvs7D0=; b=GpK4C6RGruUO25K6lH+GQRNKTJSs/uDDJt7gNnLpHcI148UmkVR2d/ScUovpvI3LQR xZlwZsIkBHzSfMfdEw2+k4q/GiLGz9W/Cql2hN/p1BvQW3Xx3l14IChBTDujoqYhOj4X RHyw4+Cr+s6KWzptpaaFPVCv+KylOAgb/oiLACFwGZAz8kguivkSqiILpYVbs6/Rx8yX w8p76QnO0SRFufRON0DN/s6LzR/Bj5//BZZR44TclftXUvAtLtqKp66uJIAkjvVqPsCJ i0vQBrHrqdrEAjlAOfdnPgp0i1k5aio6iY5y3JNCHOOoKRoTkZLJp0jnobAKwGtPh7nd 2wgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689717648; x=1692309648; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=c9RbE1RpNP6V9cJ29iFty6veB/Yh7KHZ7AHgbFvs7D0=; b=lewNE9jl4dJfJTV6x7vzcMSS12Z0QE7b4IE3xJVzELmkA9bHaWs8aZgifI5Av7kS4u I88KB64+UeeuvEts3V/LBgh0taNqFpIZJkBNFiEDQFKYtm3RX2OVQxyuqV8JUmuQcjt6 1JO0rnsIIVkZabwfpANQvFp0HPqfsP66v4ar7UKX+RxDpj/JTq7XJCs3ZplimKgi5NP/ /A8yOxKl6qNGgvOV/4dTynmfL8dbqa/7mVZHqMe0i3yChXmoRvyVaWYlJCOlGv1l5SIL jB0TblPu42G0x+i0j9j7td7FYmM/nanuw4HML4huyd+iGphY4h4sXDHPKIheJrJxJdN9 WBMA== X-Gm-Message-State: ABy/qLbJ2NQFnVQDcdVwHsPP26sG1+IK14dOSeXzZr0gYg0i4cBFaP5o QhM8FXCsTKN4j0y5KUZJ9pELc1HL7Dw= X-Google-Smtp-Source: APBJJlH94ttC4Si9D4AhR+m/pAFOhJOJq/dvNuy3YBpIMmqUi0xDCOV1rUWF74TnTg6AxrFq7eAYIQ== X-Received: by 2002:a0c:b2c8:0:b0:635:84a1:7d5a with SMTP id d8-20020a0cb2c8000000b0063584a17d5amr12113794qvf.11.1689717648475; Tue, 18 Jul 2023 15:00:48 -0700 (PDT) Received: from localhost ([2607:fea8:529e:7800::7cda]) by smtp.gmail.com with ESMTPSA id t25-20020a0cb399000000b006238f82cde4sm1017570qve.108.2023.07.18.15.00.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jul 2023 15:00:47 -0700 (PDT) From: Richard Acayan To: ffmpeg-devel@ffmpeg.org Date: Tue, 18 Jul 2023 18:00:17 -0400 Message-ID: <20230718220017.3336-1-mailingradian@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [RESEND PATCH] avcodec/v4l2_context: always log POLLERR when buffers are uninitialized 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: Richard Acayan 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: The error handler for POLLERRs assumes that the timeout is only zero when v4l2_dequeue_v4l2buf is called by v4l2_getfree_v4l2buf. This assumption is incorrect, as ff_v4l2_context_dequeue_frame also calls this function with a timeout of zero. Do not check for unavailable buffers if the buffers are uninitialized. See https://trac.ffmpeg.org/ticket/9957 for the original bug report. Signed-off-by: Richard Acayan --- libavcodec/v4l2_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c index a40be94690..69ddf80723 100644 --- a/libavcodec/v4l2_context.c +++ b/libavcodec/v4l2_context.c @@ -327,7 +327,7 @@ start: if (pfd.revents & POLLERR) { /* if we are trying to get free buffers but none have been queued yet no need to raise a warning */ - if (timeout == 0) { + if (timeout == 0 && ctx->buffers) { for (i = 0; i < ctx->num_buffers; i++) { if (ctx->buffers[i].status != V4L2BUF_AVAILABLE) av_log(logger(ctx), AV_LOG_WARNING, "%s POLLERR\n", ctx->name); -- 2.41.0 _______________________________________________ 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".