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 4651B402C8 for ; Tue, 21 Jun 2022 15:23:01 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EC64068B65F; Tue, 21 Jun 2022 18:22:58 +0300 (EEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C21E568B5F2 for ; Tue, 21 Jun 2022 18:22:51 +0300 (EEST) Received: from localhost (213-47-68-29.cable.dynamic.surfer.at [213.47.68.29]) (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id EFA82240010 for ; Tue, 21 Jun 2022 15:22:48 +0000 (UTC) Date: Tue, 21 Jun 2022 17:22:48 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220621152248.GH396728@pb2> References: MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 3/6] avformat/matroskaenc: Split updating CodecPrivate from writing it 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-Type: multipart/mixed; boundary="===============3353768250239816217==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3353768250239816217== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vLcsoTRX0lzaznPn" Content-Disposition: inline --vLcsoTRX0lzaznPn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > 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. >=20 > Signed-off-by: Andreas Rheinhardt > --- > 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_16= 000_mono_aac_lc.m4a -f segment -segment_time 1 -map 0 -flags +bitex= act -codec copy -segment_format_options live=3D1 -segment_list ffmp= eg/tests/data/adts-to-mkv.m3u8 -y ffmpeg/tests/data/adts-to-mkv-%03d.mkv Metadata: major_brand : M4A=20 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, mon= o, 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/matroskae= nc.c:1239 Aborted (core dumped) [...] --=20 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. --vLcsoTRX0lzaznPn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYrHiRAAKCRBhHseHBAsP q979AJ0ZAIZ2jJIc8mfa1OelvdMqgzYYDACgmhOEVbuwaBQuszS7MdgY0LHDe0M= =6AtC -----END PGP SIGNATURE----- --vLcsoTRX0lzaznPn-- --===============3353768250239816217== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============3353768250239816217==--