From patchwork Tue Nov 8 11:25:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 39228 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp2761722pzb; Tue, 8 Nov 2022 03:26:15 -0800 (PST) X-Google-Smtp-Source: AMsMyM7qS7U+/Ws3/gr1WMPfCNlrYllQw9D7ZeZVGXQRJzYxXs/2PSkLnIZBXLMdukNswhyoihSY X-Received: by 2002:a17:907:7fa9:b0:791:a5c2:e25 with SMTP id qk41-20020a1709077fa900b00791a5c20e25mr53472035ejc.444.1667906775205; Tue, 08 Nov 2022 03:26:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667906775; cv=none; d=google.com; s=arc-20160816; b=wHrvCYeBgnjFP6dZMKe+p4KPROhIaFqkNBZNaripioT798mcauKSZtWXtARI5Zr9z1 qh6G4kv4d3NLqyCc/vuH90viMwPS1CynJ/Gi/xag48mJ7jfWncYSLFM326LtkJyWlGic lj3mQLLFczsZbaBtzUF5SKZyN2K7shmvIXl+5DvP8KGEyHU5W5UBlXegwrJh2wgANo2R HfiSMaWVS3r2vJPZYz1khapc8SoUfzYkgcRuBsvR655J2fnFfhwyrBzJD1r5dwf1uO0M nlWsk6Q41w1oM9sLs3xninntFHE3fnncplYaiXv3AwOawovsaOnZ3CNZw70+oQ9vT7n1 s0ZA== 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:references:in-reply-to:message-id :date:to:from:delivered-to; bh=Z1Y8wAod0N8IGtMKf/AXEDv08+52shl9OQVeH38eP5U=; b=OHGZEqynr4Bump5rupHVScqYcegiNxJn77LrEBERZ4Rso3JUyZNWBtGzhM5oZFVUkO qAAEJyfIdwsoJVashyNuXp5vUb61ze5v67vxN9y1DXtPGMaG6affhzDjXy6Ye5MXzYIV L5YdK9oPLSu/D4vKOJP1iFNMdVaI04KJHZlPRyVJcsUaT/CqrvYJuuKcagfqvIONqqJ8 wXUEDDW2k909u2610k9BViHZhIcdfxyUPCDkef1Ldwsg5wp2aBIsXUjL/Mfz/FQ4jZIG JQ5cFeWTcbHrd8N0hxp4w/kOAgpPfqxu6qTA27RgejgIBHZBRuSlPDbsks86PNKNUfaH dExQ== 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 h1-20020a0564020e8100b00463525e8776si10770480eda.491.2022.11.08.03.26.14; Tue, 08 Nov 2022 03:26:15 -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; 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 469C468BA7C; Tue, 8 Nov 2022 13:26:10 +0200 (EET) 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 4CEBA68082D for ; Tue, 8 Nov 2022 13:26:03 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 1C8232400F5 for ; Tue, 8 Nov 2022 12:26:02 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 0Ok_0pGMrcHM for ; Tue, 8 Nov 2022 12:26:01 +0100 (CET) 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 mail0.khirnov.net (Postfix) with ESMTPS id DA0452404F8 for ; Tue, 8 Nov 2022 12:26:00 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 969033A1977 for ; Tue, 8 Nov 2022 12:25:54 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Tue, 8 Nov 2022 12:25:50 +0100 Message-Id: <20221108112550.8375-5-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221108112550.8375-1-anton@khirnov.net> References: <20221108112550.8375-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/5] fftools/ffmpeg: make demuxing with one file always blocking 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: spuEV1U3oFbT --- fftools/ffmpeg_demux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 8ea5318148..b32bac217d 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -363,8 +363,9 @@ static int thread_start(Demuxer *d) if (d->thread_queue_size <= 0) d->thread_queue_size = (nb_input_files > 1 ? 8 : 1); - if (f->ctx->pb ? !f->ctx->pb->seekable : - strcmp(f->ctx->iformat->name, "lavfi")) + if (nb_input_files > 1 && + (f->ctx->pb ? !f->ctx->pb->seekable : + strcmp(f->ctx->iformat->name, "lavfi"))) d->non_blocking = 1; ret = av_thread_message_queue_alloc(&d->in_thread_queue, d->thread_queue_size, sizeof(DemuxMsg));