From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 151DC4A7C0 for ; Tue, 9 Apr 2024 13:01:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B787B68D1D7; Tue, 9 Apr 2024 15:59:31 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1BC5D68D18A for ; Tue, 9 Apr 2024 15:59:22 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1712667558; bh=AEStckKVyU7tZ92H7sOZKCzIyc/boUg/jr6V6WIiRbc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WWNgZyAH1ZcQhkQsS7/DuHU8VDNL5JQC25NTzABRwTPcOhEMpcgvdAnEqF+wjmIeD +jYKUBPNL/OLBkA4WJ6hKwsZlYN9yn+dfFLJzjQCJX/UB5r9jwA/WEEwzhgdzWS5eJ Nl7TSQyWO21Zx6hST6ChaPB2DbCohN7vRQiL+IfI= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 20F4B43315; Tue, 9 Apr 2024 14:59:18 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Tue, 9 Apr 2024 14:57:28 +0200 Message-ID: <20240409125914.61149-9-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240409125914.61149-1-ffmpeg@haasn.xyz> References: <20240409125914.61149-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 08/11] avformat/movenc: warn if dovi cfg ignored 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Niklas Haas Since this is guarded behind strict unofficial, we should warn if the user feeds a dolby vision stream to this muxer, as it will otherwise result in a broken file. --- libavformat/movenc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 15b65dcf96d..0f819214be9 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2528,16 +2528,21 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex const AVPacketSideData *spherical_mapping = av_packet_side_data_get(track->st->codecpar->coded_side_data, track->st->codecpar->nb_coded_side_data, AV_PKT_DATA_SPHERICAL); - const AVPacketSideData *dovi = av_packet_side_data_get(track->st->codecpar->coded_side_data, - track->st->codecpar->nb_coded_side_data, - AV_PKT_DATA_DOVI_CONF); - if (stereo_3d) mov_write_st3d_tag(s, pb, (AVStereo3D*)stereo_3d->data); if (spherical_mapping) mov_write_sv3d_tag(mov->fc, pb, (AVSphericalMapping*)spherical_mapping->data); - if (dovi) + } + + if (track->mode == MODE_MP4) { + const AVPacketSideData *dovi = av_packet_side_data_get(track->st->codecpar->coded_side_data, + track->st->codecpar->nb_coded_side_data, + AV_PKT_DATA_DOVI_CONF); + if (dovi && mov->fc->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) { mov_write_dvcc_dvvc_tag(s, pb, (AVDOVIDecoderConfigurationRecord *)dovi->data); + } else if (dovi) { + av_log(mov->fc, AV_LOG_WARNING, "Not writing 'dvcC'/'dvvC' box. Requires -strict unofficial.\n"); + } } if (track->par->sample_aspect_ratio.den && track->par->sample_aspect_ratio.num) { -- 2.44.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".