From patchwork Sun Jul 28 10:25:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 50795 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:16f:b0:489:2eb3:e4c4 with SMTP id h47csp589018vqi; Sun, 28 Jul 2024 03:52:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU6OPN4M5QCIjlmFKodEbSmPfUCFqKlig8yKQsurjTlemSsPOkMdnCPBJThmoWcCvnjVHluXu5Ms8lflKT+77eN107SAQ30bVEuuQ== X-Google-Smtp-Source: AGHT+IE1Ky2XlxeF9q6G96Vm8eoM/iaEvOhHfxJkJXJLngYaSnHp2lrRq646ZU8AebKYIuLa/T0v X-Received: by 2002:a05:651c:1049:b0:2f0:1a19:f3f1 with SMTP id 38308e7fff4ca-2f12ebcb3b4mr31234771fa.7.1722163926925; Sun, 28 Jul 2024 03:52:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722163926; cv=none; d=google.com; s=arc-20160816; b=wDqSpgE9MQQx4dg5dnN+UYnafvseAPD+zLvyczEEUsIVd9Fzx6vSyPm6cgDU/R3PNx KKjt6lyQLOVdbpl/Yu57oGJl+t7MBTKJyqCpI6QGUrZjd6ngiaj44gT8bmuyuWL1mc1G 8CAOUYw0UP+a4iTSGR9Jv4L2Nm0YnUqQC7P65xMcf7iBlRfRerJsSRLpCuyzSL/nBkKB Hel0WYWwq15EDFRYTAiHv+rUzYf8rmgq5nwZXU8pRSQ0+CMeKw/tebGdQW6XCHTKJmaP ojUGXa9lAQxfJImfV0/WoWiRzFsfp5pAiAy1m/sSuS2I7nbLmelxMOzrkWM94BrHjL9l 5j9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=a23/uUwcoZtfmZqpiI3ijAFtahT0mBhHuGqHj1uUOO4=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=ybycURL4c/AK1rtBv13t3JmqLazawwAW4N27F/cYAWo2q2kR1Th0WD+BfiuNtbtKPW g5tiAqLATfCJN5uRDJw+4dYhHL7AOZ7l7xLB6oPi17JaPVKQKZTx7ePmJ9QTtUY44kK8 kOU9u9V4oe0IIuiWFWZRJKiPPOsht1MMipf+Bgk324aTytE9/SyB5NztLiPhWtBP9tnZ HU2a1h8EE96XHqHtTiTJ1mDc1E/c3GGQSo4kCosxs6uZw0TlnPTFzygULOnJtV8ilJx7 PP4G0vKrUUbkmm0iZTu4p73OYkKn+qWBTQ+t46UuAF54nHVtCm8q0fqLIdclBwsRJFU3 HWgg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=E3tDdNEk; 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 38308e7fff4ca-2f03d1aa779si18514331fa.657.2024.07.28.03.52.06; Sun, 28 Jul 2024 03:52:06 -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; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=E3tDdNEk; 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 DE8CA68D8B3; Sun, 28 Jul 2024 13:25:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E255468D89B for ; Sun, 28 Jul 2024 13:25:41 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1722162340; bh=ZA1LZF46jsamtNo/gXY9X6D9Un+/3BV/RCC29LSeYG0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E3tDdNEkcU9hSIXT64JTb2j058qPLWxVhC6NlJWtsZ2fVLU8Va12JnXppqf+VEVz0 TwqRmCZy45RzwRESQsYStoTRgPSeocXtSGxWhBQYAMV/Dx98qPy22SA7a/ASAQex1D OdSjbY6CbSFYOS3CXGKACYcENlJcauULFnu1iLdA= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 09F79470B2; Sun, 28 Jul 2024 12:25:40 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Sun, 28 Jul 2024 12:25:27 +0200 Message-ID: <20240728102527.17991-22-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240728102527.17991-1-ffmpeg@haasn.xyz> References: <20240728102527.17991-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 22/22] avcodec/libx265: raise strictness of missing DV error 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: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: B+Y+A/HjalWs From: Niklas Haas See previous commit for justification --- libavcodec/libx265.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index 718bd21b20..325c4fdd07 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -792,9 +792,11 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt, } } else if (ctx->dovi.cfg.dv_profile) { av_log(avctx, AV_LOG_ERROR, "Dolby Vision enabled, but received frame " - "without AV_FRAME_DATA_DOVI_METADATA"); - free_picture(ctx, &x265pic); - return AVERROR_INVALIDDATA; + "without AV_FRAME_DATA_DOVI_METADATA\n"); + if (avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT) { + free_picture(ctx, &x265pic); + return AVERROR_INVALIDDATA; + } } #endif }