From patchwork Mon Aug 26 23:33:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 51154 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b38f:0:b0:48e:c0f8:d0de with SMTP id r15csp71025vqn; Mon, 26 Aug 2024 16:33:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVrnN+iPJ2AxiNMuyuzJ5O3ZGx+25fi8DgsreIbrqbgM5tMOLW7QIiRSR+lbgiNCOk53z0TLe8+6YK6HTehJjxs@gmail.com X-Google-Smtp-Source: AGHT+IFr92eOYEJISEseYzrXnpf79+GmaRBEZ5XIMlM/j9CYTI/dEOuH6o1UvhdO7/yJG7E5Tf00 X-Received: by 2002:a05:6402:13cc:b0:5c0:ad76:f708 with SMTP id 4fb4d7f45d1cf-5c0ba2a804cmr675141a12.9.1724715231503; Mon, 26 Aug 2024 16:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724715231; cv=none; d=google.com; s=arc-20240605; b=d1vC6Qk8AGp1A6Ge7MnrhH8ZxhO8l4p3671Lo5o4n9qvwnsc0yJgvZTpGlOHiecEpg 5b7D92hICNerOMrhR2C64maEslxIFvKkEev5hxGcR3cQsinQ6CQPV7sZky66CjaSGlba rhFU2CPZ2rddoznd/6ECh9K2CdNQJo4AB5AhDcc8pl2d3582dOf/yazGNCnVHkFQUHlT vB5Wp55DWD7iPL1SKukBnfmm/oljfyfk6GY1qD+yt8AhffaWa1R8UCmnfblCSahKYpxZ fzdn1mdm0dty1xyPIX6FYwd4dkB7eBFgQXlRw9mzKAOaa+6OisBcKN2HPmwNBmNeHxaO /wWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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:message-id:date:to:from :delivered-to; bh=ZgLU6oERSRPt7orf0a7DZZSgRixb94OqSV78vz7C/fQ=; fh=s+G8Ss4JbeMFkWPSp2LmIH/LXFyBlALRiww1j3FPjHY=; b=Yt35PAvX4DPxngy5rfRKPtH7VzHJMLvfk6q0qB8M7qPLBoSfHNpt0QPLakBIzTpIoH 2AJGLL66ECNEZPPSMbZ9wJQvpS/JHybXxDF0jPSdcxtaJ0iuwqe2XGh0vgAyVqoYVRIa xJsk/0b2G2/t5ad2UD5dn63GWRx3Zpy+HSMsoS6yoOVbDJuf9lCWRqXPEWCo18mF4UvA 6/EfloQ8NdjGsbP7jfu+gS7/djdhCptDOMtjQQZsACvlnfZ3Gh33acpeOBJxX/nwaiph CQgyUv1bsj0REc9QWq40XAWkJ3858wdtZ9FRHqYY454ArwapUVHqNfBw6ZqLyIXZDfp/ mdhA==; dara=google.com 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 4fb4d7f45d1cf-5c0bb4a61efsi364061a12.602.2024.08.26.16.33.51; Mon, 26 Aug 2024 16:33:51 -0700 (PDT) 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 855C068D519; Tue, 27 Aug 2024 02:33:47 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CC68E68DA44 for ; Tue, 27 Aug 2024 02:33:39 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 860D0EAD51; Tue, 27 Aug 2024 01:33:39 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NtEiUzOMpRlG; Tue, 27 Aug 2024 01:33:37 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 2DC81EAD43; Tue, 27 Aug 2024 01:33:37 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Tue, 27 Aug 2024 01:33:26 +0200 Message-ID: <20240826233330.14039-1-cus@passwd.hu> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/mxfdec: disallow generic seek search 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: Marton Balint Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: cVKXczSmW/Mb If the demuxer does not provide per-stream indexes, the generic seek search can attempt to read the whole media file from the beginning when seeking. For large MXF files this can cause huge lockups for a seek after the last timestamp, which will eventually fail. So let's disable the generic seek for mxf, the demuxer's own seek code should handle seeking just fine. Signed-off-by: Marton Balint --- libavformat/mxfdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index af0c8a3100..ac63c0d5ad 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -4274,7 +4274,7 @@ static const AVClass demuxer_class = { const FFInputFormat ff_mxf_demuxer = { .p.name = "mxf", .p.long_name = NULL_IF_CONFIG_SMALL("MXF (Material eXchange Format)"), - .p.flags = AVFMT_SEEK_TO_PTS, + .p.flags = AVFMT_SEEK_TO_PTS | AVFMT_NOGENSEARCH, .p.priv_class = &demuxer_class, .priv_data_size = sizeof(MXFContext), .flags_internal = FF_INFMT_FLAG_INIT_CLEANUP,