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 64F5C4030D for ; Fri, 21 Jan 2022 10:52:43 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 43A7668B287; Fri, 21 Jan 2022 12:52:41 +0200 (EET) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D45B268B13E for ; Fri, 21 Jan 2022 12:52:34 +0200 (EET) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 20LAqXQu007034-20LAqXQv007034; Fri, 21 Jan 2022 12:52:33 +0200 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id E3876A142A; Fri, 21 Jan 2022 12:52:33 +0200 (EET) Date: Fri, 21 Jan 2022 12:52:33 +0200 (EET) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: Message-ID: <6ace45d6-1796-79e-bfe6-a8be9567d82@martin.st> References: MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM Subject: Re: [FFmpeg-devel] [PATCH] avformat/mov: Fix endian-dependent parsing 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: Andreas Rheinhardt Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Fri, 21 Jan 2022, Andreas Rheinhardt wrote: > MOVAtom.type is always read as a little-endian number > (despite MOV/ISOBMFF being big-endian). > Fixes the matroska-dovi-write-config8 FATE-test on big-endian > arches (which runs into the "index out of range" warning message). > > Signed-off-by: Andreas Rheinhardt > --- > A few days ago I sent a patch using the dv84.mov sample > that also failed on the PPC BE endian FATE box, yet this test > reencoded the audio and so I blamed this (despite encoder and > decoder being fixed-point); see [1]. Seems like I was wrong > and the fixed-point codecs are indeed bitexact. > > [1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2022-January/291792.html > > libavformat/mov.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/mov.c b/libavformat/mov.c > index e401cd39b5..1437d160f8 100644 > --- a/libavformat/mov.c > +++ b/libavformat/mov.c > @@ -407,7 +407,7 @@ retry: > atom.size -= 16; > > if (!key && c->found_hdlr_mdta && c->meta_keys) { > - uint32_t index = AV_RB32(&atom.type); > + uint32_t index = av_bswap32(atom.type); // BE number has been read as LE LGTM. // Martin _______________________________________________ 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".