Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v3 5/7] avformat/matroskaenc: write a MaxBlockAdditionID element
Date: Wed, 29 Mar 2023 22:28:11 -0300
Message-ID: <8030d6f0-410f-1c4b-4868-5765fe1ee106@gmail.com> (raw)
In-Reply-To: <GV1P250MB0737843352D3789F89D1D7BE8F8E9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM>

On 3/29/2023 9:44 PM, Andreas Rheinhardt wrote:
>> @@ -3070,6 +3082,25 @@ after_cues:
>>   
>>       if (mkv->track.bc) {
>>           // write Tracks master
>> +        int64_t end = avio_tell(mkv->track.bc);
>> +
>> +        for (int i = 0; i < s->nb_streams; i++) {
> AVFormatContext.nb_streams is unsigned, so i should be, too.

This same kind of loop is done with an int everywhere, but ok, will 
change it since it's harmless.

> 
>> +            const mkv_track *track = &mkv->tracks[i];
>> +
>> +            if (IS_WEBM(mkv))
>> +                break;
> This check does not belong into the loop.

Changed, but it looks uglier now.

> 
>> +            if (!track->max_blockaddid)
>> +                continue;
>> +
>> +            // We reserved a single byte to write this value.
>> +            av_assert0(track->max_blockaddid <= 0xFF);
>> +
>> +            avio_seek(mkv->track.bc, track->blockadditionmapping_offset, SEEK_SET);
>> +
>> +            put_ebml_uint(mkv->track.bc, MATROSKA_ID_TRACKMAXBLKADDID, track->max_blockaddid);
>> +        }
>> +
>> +        avio_seek(mkv->track.bc, end, SEEK_SET);
> This seek (and the avio_tell() before the loop) seem unnecessary; see
> 0fc150f048398c9dbb8578f25e916fd356c18a54.

Ah, good to know. Will remove it then.
_______________________________________________
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-03-30  1:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24 15:52 [FFmpeg-devel] [PATCH v2 1/7] avformat/matroskadec: support parsing more than one BlockMore element James Almer
2023-03-24 15:52 ` [FFmpeg-devel] [PATCH v2 2/7] avformat/matroskadec: set the default value for BlockAddIDType James Almer
2023-03-24 15:52 ` [FFmpeg-devel] [PATCH v2 3/7] avformat/matroskadec: export Dynamic HDR10+ packet side data James Almer
2023-03-30  0:43   ` Andreas Rheinhardt
2023-03-30  1:51     ` James Almer
2023-03-24 15:52 ` [FFmpeg-devel] [PATCH v2 4/7] avformat/matroska: add a few more Block Addition ID Type enum values James Almer
2023-03-30  0:43   ` Andreas Rheinhardt
2023-03-30  0:48     ` James Almer
2023-03-24 15:52 ` [FFmpeg-devel] [PATCH v3 5/7] avformat/matroskaenc: write a MaxBlockAdditionID element James Almer
2023-03-25 11:39   ` Michael Niedermayer
2023-03-25 11:40     ` James Almer
2023-03-30  0:44   ` Andreas Rheinhardt
2023-03-30  1:28     ` James Almer [this message]
2023-03-24 15:52 ` [FFmpeg-devel] [PATCH v3 6/7] avformat/matroskaenc: support writing Dynamic HDR10+ packet side data James Almer
2023-03-28 15:33   ` [FFmpeg-devel] [PATCH v4 " James Almer
2023-03-30  0:44   ` [FFmpeg-devel] [PATCH v3 " Andreas Rheinhardt
2023-03-30  1:41     ` James Almer
2023-03-24 15:52 ` [FFmpeg-devel] [PATCH v3 7/7] fate/matroska: add HDR10+ muxing tests James Almer
2023-03-30  0:43 ` [FFmpeg-devel] [PATCH v2 1/7] avformat/matroskadec: support parsing more than one BlockMore element Andreas Rheinhardt
2023-03-30  0:57   ` James Almer

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=8030d6f0-410f-1c4b-4868-5765fe1ee106@gmail.com \
    --to=jamrial@gmail.com \
    --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