Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Gyan Doshi <ffmpeg@gyani.pro>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avformat/movenc: correct loci parameter handling
Date: Sat, 1 Apr 2023 09:42:28 +0530
Message-ID: <5f5edd0f-c29d-02b4-9af9-17595f33ad1a@gyani.pro> (raw)
In-Reply-To: <20230326074130.1317-1-ffmpeg@gyani.pro>

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".

  reply	other threads:[~2023-04-01  4:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-26  7:41 Gyan Doshi
2023-04-01  4:12 ` Gyan Doshi [this message]
2023-04-03  9:32   ` Gyan Doshi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f5edd0f-c29d-02b4-9af9-17595f33ad1a@gyani.pro \
    --to=ffmpeg@gyani.pro \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git