From patchwork Wed Aug 19 09:50:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ManojGuptaBonda X-Patchwork-Id: 21735 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 6960844B527 for ; Wed, 19 Aug 2020 12:51:06 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4B147689C71; Wed, 19 Aug 2020 12:51:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D98596880DE for ; Wed, 19 Aug 2020 12:50:59 +0300 (EEST) Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 19 Aug 2020 02:49:59 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Wed, 19 Aug 2020 02:50:57 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Wed, 19 Aug 2020 02:50:57 -0700 Received: from bondagupta-NVWorkStation.nvidia.com (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 19 Aug 2020 09:50:55 +0000 From: ManojGuptaBonda To: Date: Wed, 19 Aug 2020 15:20:35 +0530 Message-ID: <20200819095035.27557-1-mbonda@nvidia.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1597830599; bh=9/w6fAQ8RiMCmOggLk9Bd8ECZ5ALrUKM/Im/6wCYKwU=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:X-Originating-IP:X-ClientProxiedBy:Content-Type; b=OJPvYJkR1I3sfHi7ZUbd+dERgQnXkOiBs4nVbMymcX47gWVU9oIlyyuz62lDUEJgw IKTsOnHIAMhvoTn0iaobwPHqRlj8X5JmP28VXLnFpVuhkHN6Wh0ZfjRZpqTrorzHYN muGn6/JvIi098ig5BJu3g6yXnaxcziF5FOBHnfsN5wbzwQeRtOlC2JI5ou0ekNSa8e wKpQKI1zBipykGno/8WwP+pr0EQtpaXVGpExMnletDVvXk+bJ8ogFPpe9pDB9reT8t MDzYDoFUWbVerON0rNhmnB3XBH9uQVhr5cU+m5vCeOH1gMMco9Rmk5Qc9WbH3a7G1I y0krCfJXhuMkg== Subject: [FFmpeg-devel] [PATCH] Set AVSTREAM_PARSE_HEADERS flag for AV1 MP4 streams. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: vikasa@nvidia.com, mbonda@nvidia.com Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Vikas Agarwal It allow AV1 header parsing and help initialize chroma format and other info properly. Chroma format wasn't correct if we use below code: avformat_find_stream_info(fmtc, NULL); iVideoStream = av_find_best_stream(fmtc, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0); eChromaFormat = (AVPixelFormat)fmtc->streams[iVideoStream]->codecpar-> format; --- libavformat/mov.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 1532e74d67..4d4b5c0f48 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -7615,6 +7615,8 @@ static int mov_read_header(AVFormatContext *s) av_log(s, AV_LOG_VERBOSE, "Forcing full parsing for mp3 stream\n"); st->need_parsing = AVSTREAM_PARSE_FULL; } + if (st->codecpar->codec_id == AV_CODEC_ID_AV1) + st->need_parsing = AVSTREAM_PARSE_HEADERS; } if (mov->trex_data) {