From patchwork Fri Dec 31 19:50:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John-Paul Stewart X-Patchwork-Id: 32973 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp14213937iog; Fri, 31 Dec 2021 11:50:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxZk0zfgpCNmQ7b7dOS5W+p4KeLinjrNJFMTMkIb+FvDrcIkklgbhGeXiVMGLVu+oCGHp1L X-Received: by 2002:a50:9b53:: with SMTP id a19mr34897846edj.366.1640980244114; Fri, 31 Dec 2021 11:50:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1640980244; cv=none; d=google.com; s=arc-20160816; b=xuqQX4QodruU9mqrku6W4KZiWy3exuINhModaZ4u4D/vKol3JmfXywiljP+KHOt1nA a/+A+1lj/5tsNas5ug/1EHEEDLoYsESJZSvQYaHgaPwrz3OBAitzURn3xyLk0gTErZIf P/07dPJ3Hy4dOMBvFGcW7gKcKx8mBHEDZXZJHZjAQp5KwQ4d7PPUua8/SrcY2Sh2WDF9 NN4iZ3BVU/bS7PJqAtqxGtnlzWyR4mNHcCE5e2BD2/YqNdTLbFuHscmKWBGWNo5aPXz5 uh5W2N+DIA+KZLpU8g9EYEYM7svHfcY8hoX3kFehop619N6cdD4oSp3P0GTQs/XEidWC 9nWQ== 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:message-id:date:to:from :dkim-signature:delivered-to; bh=3MLva2/8rQFUyaVo6vxLhwTLpCkDAz74E2YJpBhqg20=; b=ZPO8Rq31P93FRva9IKV4QrarWZV3FwyG4N+4IsSIAMxm/8HbXANnLO/U5C+zqKWQfP v90TTxSYqDKAIBZeShLgt1S2hkHXqxEA0MtFAdWqypXdTSyhWTtLWGqmxsTsqnfT2PHM e+pSjSNeo/7PFTBJ79GOKRblV+Y2QsGXr9KELskkN8PXjKF6JkVeziehJlk68KJ8dFhg 4qdK1DI/5kV1WwkEDx7uAMYVArYlcc6KUvim6vtam1wCIkvWfaNGv34ddAgV9TQrurO8 ubURS8HqbkMEXh5M3hpUiZBL3pWjD6otpIXcVxDFfN33Sx6j6iRuNeICft0CM8Y3ri5n np+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@personalprojects.net header.s=20211201 header.b=gGDlwl7A; 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 y6si14824837edp.344.2021.12.31.11.50.43; Fri, 31 Dec 2021 11:50:44 -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=@personalprojects.net header.s=20211201 header.b=gGDlwl7A; 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 B3F9768B079; Fri, 31 Dec 2021 21:50:40 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.personalprojects.net (mail.personalprojects.net [51.79.67.80]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A02AE68AC57 for ; Fri, 31 Dec 2021 21:50:34 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=personalprojects.net; s=20211201; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=F5MbtzdnBfJDcToxBjIHNiIlt2VaRs/VeKm42i6rYcc=; b=gGDlwl7AKRvOJPnbGHvbNcACwS 1/LENJmXw93A178XU7k3lqk7+E6pkAbXz243Grn8cE518w84etg0oRoNEwifLES07vXn9BclFnmSq S1/cDxemLctwXxQdj9M90Gl1mONhxyKIeGKcDqneEweVIB8s4NzpOcrWn6fHuxnm/pYI=; Received: from bras-base-simcon3012w-grc-05-64-231-188-105.dsl.bell.ca ([64.231.188.105] helo=courtney.binaryfoundry.ca) by mail.personalprojects.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n3Nv7-0006Oe-3N for ffmpeg-devel@ffmpeg.org; Fri, 31 Dec 2021 14:50:33 -0500 From: John-Paul Stewart To: ffmpeg-devel@ffmpeg.org Date: Fri, 31 Dec 2021 14:50:17 -0500 Message-Id: <20211231195019.16191-1-jpstewart@personalprojects.net> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 0/2] avformat/mvdec: make audio stream conditional 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: ImFb5TCbYtIx Recent discussion on the list led me to realize that libavformat was unconditionally creating an audio stream for all SGI movie format (version 2) files, even when no audio is present in the file. A sample of a movie file with no audio can be found at http://www.personalprojects.net/ffmpeg/silent.movie Unpatched ffmpeg will report an audio stream even though no audio is present. After the following patch no audio stream is reported. SGI movie files with audio are slightly affected by the fact that the audio stream is now allocated after the video stream, changing the order they are listed in the output of ffprobe or ffmpeg. I don't think this materially affects anything. All existing FATE tests pass. Incidentally, the silent.movie sample above is at 25fps and can also be used by anyone who wants to double-check the earlier patch 3c9ffbd009 that reads and sets the framerate. The sample file is only about 88 KB.