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 via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: James Almer <jamrial@gmail.com>
Subject: [FFmpeg-devel] Re: [PATCH 1/7] matroskaenc: remove unused MaxBlockAdditionID
Date: Fri, 12 Sep 2025 11:57:14 -0300
Message-ID: <933379eb-8255-4b26-a7c4-4f3369e5ad49@gmail.com> (raw)
In-Reply-To: <5fc6ed86-32a5-44fc-bf15-01da82538de6@mediaarea.net>


[-- Attachment #1.1.1: Type: text/plain, Size: 1953 bytes --]

On 9/9/2025 9:38 AM, Jerome Martinez via ffmpeg-devel wrote:
> diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
> index 8142d9125e..5339b6fd33 100644
> --- a/libavformat/matroskaenc.c
> +++ b/libavformat/matroskaenc.c
> @@ -1706,16 +1706,16 @@ static void mkv_write_blockadditionmapping(AVFormatContext *s, const MatroskaMux
>      const AVDOVIDecoderConfigurationRecord *dovi;
>      const AVPacketSideData *sd;
>  
> -    if (IS_SEEKABLE(s->pb, mkv)) {
> +    if (IS_SEEKABLE(s->pb, mkv) && par->codec_type == AVMEDIA_TYPE_VIDEO) {
>          track->blockadditionmapping_offset = avio_tell(pb);
>          // We can't know at this point if there will be a block with BlockAdditions, so
>          // we either write the default value here, or a void element. Either of them will
>          // be overwritten when finishing the track.
> -        put_ebml_uint(pb, MATROSKA_ID_TRACKMAXBLKADDID, 0);
>          if (par->codec_type == AVMEDIA_TYPE_VIDEO) {

This is now redundant. Did you intend this entire code to not be called 
for audio and subtitles?

>              // Similarly, reserve space for an eventual
>              // HDR10+ ITU T.35 metadata BlockAdditionMapping.
> -            put_ebml_void(pb, 3 /* BlockAdditionMapping */
> +            put_ebml_void(pb, 4 /* MaxBlockAdditionID */
> +                            + 3 /* BlockAdditionMapping */
>                              + 4 /* BlockAddIDValue */
>                              + 4 /* BlockAddIDType */);
>          }
> @@ -3294,7 +3294,7 @@ after_cues:
>              for (unsigned i = 0; i < s->nb_streams; i++) {
>                  const mkv_track *track = &mkv->tracks[i];
>  
> -                if (!track->max_blockaddid)
> +                if (!track->max_blockaddid || !track->blockadditionmapping_offset)
>                      continue;
>  
>                  // We reserved a single byte to write this value.



[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

[-- Attachment #2: Type: text/plain, Size: 163 bytes --]

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

  parent reply	other threads:[~2025-09-12 14:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-09 12:37 [FFmpeg-devel] [PATCH 0/7] matroska: support of timecode Jerome Martinez via ffmpeg-devel
2025-09-09 12:38 ` [FFmpeg-devel] [PATCH 1/7] matroskaenc: remove unused MaxBlockAdditionID Jerome Martinez via ffmpeg-devel
2025-09-12 14:52   ` [FFmpeg-devel] " Michael Niedermayer via ffmpeg-devel
2025-09-12 14:57   ` James Almer via ffmpeg-devel [this message]
2025-09-09 12:39 ` [FFmpeg-devel] [PATCH 2/7] matroskaenc: reserve_video_track_space option Jerome Martinez via ffmpeg-devel
2025-09-09 12:39 ` [FFmpeg-devel] [PATCH 3/7] matroskaenc: increase default for reserved bytes in video Jerome Martinez via ffmpeg-devel
2025-09-09 12:40 ` [FFmpeg-devel] [PATCH 4/7] 32-bit timecode to 64-bit RFC 5484 timecode functions Jerome Martinez via ffmpeg-devel
2025-09-09 12:41 ` [FFmpeg-devel] [PATCH 5/7] decklink_dec: store timecode in 64-bit RFC 5484 format Jerome Martinez via ffmpeg-devel
2025-09-09 12:41 ` [FFmpeg-devel] [PATCH 6/7] matroskadec: read timecode in BlockAddition Jerome Martinez via ffmpeg-devel
2025-09-09 12:41 ` [FFmpeg-devel] [PATCH 7/7] matroskaenc: write " Jerome Martinez via ffmpeg-devel
2025-09-11 15:52 ` [FFmpeg-devel] Re: [PATCH 0/7] matroska: support of timecode Dave Rice via ffmpeg-devel

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=933379eb-8255-4b26-a7c4-4f3369e5ad49@gmail.com \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=jamrial@gmail.com \
    /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