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 150314592A for ; Thu, 27 Apr 2023 12:45:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C80FD68BF13; Thu, 27 Apr 2023 15:45:53 +0300 (EEST) Received: from mail.frobbit.se (mail.frobbit.se [85.30.129.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DB539687F91 for ; Thu, 27 Apr 2023 15:45:47 +0300 (EEST) Received: from debian.lan (h-79-136-39-105.A258.priv.bahnhof.se [79.136.39.105]) by mail.frobbit.se (Postfix) with ESMTPSA id F407720101 for ; Thu, 27 Apr 2023 14:45:46 +0200 (CEST) Message-ID: From: Tomas =?ISO-8859-1?Q?H=E4rdin?= To: FFmpeg development discussions and patches Date: Thu, 27 Apr 2023 14:45:46 +0200 In-Reply-To: <64da988c-0269-6d65-d8a6-b9c0113d0480@ektacom.com> References: <20230331214701.GC1164690@pb2> <7a09e1d3-8d2e-7318-dab0-776247171251@ektacom.com> <20230403151448.GT1164690@pb2> <64da988c-0269-6d65-d8a6-b9c0113d0480@ektacom.com> User-Agent: Evolution 3.38.3-1+deb11u1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] MXF - Add jpeg2000 subdescriptor - Sponsored by INA 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 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: > static inline uint16_t rescale_mastering_chroma(AVRational q) > { > @@ -1260,7 +1305,6 @@ static int64_t > mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID > f1 *= 2; > } > > - Stray deleted line > + /* Image components number */ > + mxf_write_local_tag(s, 2, 0x840A); > + avio_wb16(pb, component_count); > + /* Array of picture components where each component comprises 3 Looks like you missed a space there (: > + /* Extract usefull size infromation from the SIZ marker */ > + if (bytestream2_get_be16u(&g) != JPEG2000_SIZ) { > + av_log(s, AV_LOG_ERROR, "SIZ marker not present\n"); > + return 0; > + } > + bytestream2_skip(&g, 2); // Skip Lsiz > + sc->j2k_cap = bytestream2_get_be16u(&g); > + sc->j2k_xsiz = bytestream2_get_be32u(&g); > + sc->j2k_ysiz = bytestream2_get_be32u(&g); > + sc->j2k_x0siz = bytestream2_get_be32u(&g); > + sc->j2k_y0siz = bytestream2_get_be32u(&g); > + sc->j2k_xtsiz = bytestream2_get_be32u(&g); > + sc->j2k_ytsiz = bytestream2_get_be32u(&g); > + sc->j2k_xt0siz = bytestream2_get_be32u(&g); > + sc->j2k_yt0siz = bytestream2_get_be32u(&g); > + j2k_ncomponents = bytestream2_get_be16u(&g); > + if (j2k_ncomponents != component_count) { > + av_log(s, AV_LOG_WARNING, "Incoherence about components > image number.\n"); Erroring out here seems more appropriate. /Tomas _______________________________________________ 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".