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 104EC45483 for ; Sat, 1 Apr 2023 04:12:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 05C2968C121; Sat, 1 Apr 2023 07:12:52 +0300 (EEST) Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6C04A68C0F5 for ; Sat, 1 Apr 2023 07:12:44 +0300 (EEST) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4PpNzZ2sDlz9sZD for ; Sat, 1 Apr 2023 06:12:42 +0200 (CEST) Message-ID: <5f5edd0f-c29d-02b4-9af9-17595f33ad1a@gyani.pro> Date: Sat, 1 Apr 2023 09:42:28 +0530 MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org References: <20230326074130.1317-1-ffmpeg@gyani.pro> Content-Language: en-US From: Gyan Doshi In-Reply-To: <20230326074130.1317-1-ffmpeg@gyani.pro> X-Rspamd-Queue-Id: 4PpNzZ2sDlz9sZD Subject: Re: [FFmpeg-devel] [PATCH] avformat/movenc: correct loci parameter handling 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-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: Plan to push in 48h. On 2023-03-26 01:11 pm, Gyan Doshi wrote: > 3GPP TS 26.244 Table 8.10 specifies that longitude is written before > latitude. The MOV demuxer already expects the correct order. So, write > them in that order. > > However, the user supplied string may also be used in MOV mode which > requires ISO 6709 format which specifies latitude first. The demuxer > also exports the loci value in that format. So parser adjusted as well. > --- > libavformat/movenc.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libavformat/movenc.c b/libavformat/movenc.c > index 68e7f8222b..c370922c7d 100644 > --- a/libavformat/movenc.c > +++ b/libavformat/movenc.c > @@ -4021,13 +4021,13 @@ static int mov_write_loci_tag(AVFormatContext *s, AVIOContext *pb) > return 0; > > ptr = t->value; > - longitude = strtod(ptr, &end); > + latitude = strtod(ptr, &end); > if (end == ptr) { > av_log(s, AV_LOG_WARNING, "malformed location metadata\n"); > return 0; > } > ptr = end; > - latitude = strtod(ptr, &end); > + longitude = strtod(ptr, &end); > if (end == ptr) { > av_log(s, AV_LOG_WARNING, "malformed location metadata\n"); > return 0; > @@ -4048,8 +4048,8 @@ static int mov_write_loci_tag(AVFormatContext *s, AVIOContext *pb) > avio_wb16(pb, lang); > avio_write(pb, place, strlen(place) + 1); > avio_w8(pb, 0); /* role of place (0 == shooting location, 1 == real location, 2 == fictional location) */ > - avio_wb32(pb, latitude_fix); > avio_wb32(pb, longitude_fix); > + avio_wb32(pb, latitude_fix); > avio_wb32(pb, altitude_fix); > avio_write(pb, astronomical_body, strlen(astronomical_body) + 1); > avio_w8(pb, 0); /* additional notes, null terminated string */ _______________________________________________ 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".