Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 3/6] avformat/matroskaenc: Split updating CodecPrivate from writing it
Date: Tue, 21 Jun 2022 17:22:48 +0200
Message-ID: <20220621152248.GH396728@pb2> (raw)
In-Reply-To: <DB6PR0101MB22144DA7B305AF521ADEAD4F8FB39@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com>


[-- Attachment #1.1: Type: text/plain, Size: 2616 bytes --]

On Tue, Jun 21, 2022 at 04:34:15AM +0200, Andreas Rheinhardt wrote:
> Up until now, updating extradata was very ad-hoc: The amount of
> space reserved for extradata was not recorded when writing the
> header; instead the AAC code simply presumed that it was enough.
> This commit changes this by recording how much space is available.
> 
> This brings with it that the code for writing of and reserving space
> for the CodecPrivate and for updating it diverges. They are therefore
> split; this allows to put other common tasks like seeking to
> right offset as well as writing padding (in case the new extradata did
> not fill the whole reserved space) to this common function.
> 
> The code for filling up the reserved space is smarter than the code
> it replaces; therefore it is no longer necessary to reserve more
> than necessary just to be sure that one can add an EBML Void element
> (whose minimum size is two) lateron. This is the reason for the change
> to the aac-autobsf-adtstoasc test.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavformat/matroskaenc.c            | 120 ++++++++++++++++++---------
>  tests/ref/fate/aac-autobsf-adtstoasc |   4 +-
>  2 files changed, 84 insertions(+), 40 deletions(-)

triggers assert in fate

ffmpeg/ffmpeg -nostdin         -i fate-suite//audiomatch/tones_afconvert_16000_mono_aac_lc.m4a         -f segment -segment_time 1 -map 0 -flags +bitexact -codec copy -segment_format_options live=1         -segment_list ffmpeg/tests/data/adts-to-mkv.m3u8 -y ffmpeg/tests/data/adts-to-mkv-%03d.mkv

  Metadata:
    major_brand     : M4A 
    minor_version   : 0
    compatible_brands: M4A mp42isom
    creation_time   : 2024-12-23T09:22:20.000000Z
    iTunSMPB        :  00000000 00000840 000002C0 0000000000007D00 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  Duration: 00:00:02.18, start: 0.132000, bitrate: 35 kb/s
  Stream #0:0[0x1](eng): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 20 kb/s (default)
    Metadata:
      creation_time   : 2024-12-23T09:22:20.000000Z
      vendor_id       : [0][0][0][0]
[segment @ 0x562c56aa3f40] Opening 'ffmpeg/tests/data/adts-to-mkv-000.mkv' for writing
Assertion codecpriv_size < max_payload_size failed at libavformat/matroskaenc.c:1239
Aborted (core dumped)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Take away the freedom of one citizen and you will be jailed, take away
the freedom of all citizens and you will be congratulated by your peers
in Parliament.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

_______________________________________________
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:[~2022-06-21 15:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-21  2:30 [FFmpeg-devel] [PATCH 1/6] avformat/matroskaenc: Split assembling " Andreas Rheinhardt
2022-06-21  2:34 ` [FFmpeg-devel] [PATCH 2/6] avformat/matroskaenc: Avoid swapping codecpar->extradata temporarily Andreas Rheinhardt
2022-06-21  2:34 ` [FFmpeg-devel] [PATCH 3/6] avformat/matroskaenc: Split updating CodecPrivate from writing it Andreas Rheinhardt
2022-06-21 15:22   ` Michael Niedermayer [this message]
2022-06-21 21:45     ` Andreas Rheinhardt
2022-06-21  2:34 ` [FFmpeg-devel] [PATCH 4/6] avcodec/av1: Add upper bound for the size of a sane sequence header Andreas Rheinhardt
2022-06-21  2:34 ` [FFmpeg-devel] [PATCH 5/6] avformat/matroskaenc: Improve handling of AV1 extradata Andreas Rheinhardt
2022-06-21  2:34 ` [FFmpeg-devel] [PATCH 6/6] avformat/matroskaenc: Fix outdated comment Andreas Rheinhardt
2022-06-21  3:22 ` [FFmpeg-devel] [PATCH 7/7] avformat/matroskaenc: Reuse dynamic buffer Andreas Rheinhardt
2022-06-24  9:50 ` [FFmpeg-devel] [PATCH 1/6] avformat/matroskaenc: Split assembling CodecPrivate from writing it Andreas Rheinhardt

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=20220621152248.GH396728@pb2 \
    --to=michael@niedermayer.cc \
    --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