From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 8AEC74C3FA for ; Sat, 2 Aug 2025 18:33:52 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id AD69668C53B; Sat, 2 Aug 2025 21:33:47 +0300 (EEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id F1DF768A0C5 for ; Sat, 2 Aug 2025 21:33:40 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 4D5831F68E for ; Sat, 2 Aug 2025 18:33:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1754159620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9eedNN1ARK5j1O54fdb20Oo8UZRvJi22gOkHcdL8oJM=; b=Z84jczHZdkViHu5zFxd6zz+uJcu85Hw0JuKZQHRrIQ6nmT16KGKgSbhKsAeWHibupaKZcy QqtxTlBGR/XA11gPfFIjcGHl3rKQeIGixtCvGTa+/eChpz8f5GQ77m0gcHP7SHGpu+AeTz 93opYVLJafxq+j9dHiS2dU0WLmC+ZyBlDJ014p8BMW8Cc2RUN5h4xo1tVmZDjjDhKwRzI5 hEuhfGBn3i1DkurdZQYK12jTlfhtM3C/Y8X0xRpLVo8k74BDq14ZduWCBnOC+0L/Qg7X0H Rk6svR1pAHS4ST8mei++AlhNow2u2ez/qqFjy3UlY3N4e6XfQ73g+DPEzHzrZA== Date: Sat, 2 Aug 2025 20:33:39 +0200 From: Michael Niedermayer To: ffmpeg-devel@ffmpeg.org Message-ID: <20250802183339.GY1804579@pb2> References: <20250730205424.3E09C412961@natalya.videolan.org> MIME-Version: 1.0 In-Reply-To: <20250730205424.3E09C412961@natalya.videolan.org> X-GND-State: clean X-GND-Score: 10 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddutdejfedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecufghrlhcuvffnffculddutddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeffffeuheelteduvdefkeefkeejjefftdekhedvvddtteeigfeivedufeffhfffieenucffohhmrghinhepvhhiuggvohhlrghnrdhorhhgpdhffhhmphgvghdrohhrghenucfkphepgedurdeiiedrieehrddujeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieehrddujeeipdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] avformat/mov: export the correct initial extratada from samples with multiple stsd 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="===============6325895983613667369==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6325895983613667369== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+Xnt6BZa+I2KmHWw" Content-Disposition: inline --+Xnt6BZa+I2KmHWw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi This breaks: =2E/ffmpeg -i 'tickets//1666/avc-intra-panasonic-AG-HPX301E.mov' -f null - after this patch theres a lot of errors: =2E.. [vist#0:0/h264 @ 0x55837b5fd6c0] [dec:h264 @ 0x55837b62c6c0] Error submitti= ng packet to decoder: Invalid data found when processing input [h264 @ 0x55837c768000] non-existing PPS 0 referenced Last message repeated 9 times [h264 @ 0x55837c768000] no frame! [vist#0:0/h264 @ 0x55837b5fd6c0] [dec:h264 @ 0x55837b62c6c0] Error submitti= ng packet to decoder: Invalid data found when processing input [h264 @ 0x55837b62d580] non-existing PPS 0 referenced Last message repeated 9 times [h264 @ 0x55837b62d580] no frame! [vist#0:0/h264 @ 0x55837b5fd6c0] [dec:h264 @ 0x55837b62c6c0] Error submitti= ng packet to decoder: Invalid data found when processing input [h264 @ 0x55837b6cf600] non-existing PPS 0 referenced Last message repeated 9 times [h264 @ 0x55837b6cf600] no frame! [vist#0:0/h264 @ 0x55837b5fd6c0] [dec:h264 @ 0x55837b62c6c0] Error submitti= ng packet to decoder: Invalid data found when processing input [h264 @ 0x55837b776bc0] non-existing PPS 0 referenced Last message repeated 9 times [h264 @ 0x55837b776bc0] no frame! [vist#0:0/h264 @ 0x55837b5fd6c0] [dec:h264 @ 0x55837b62c6c0] Decoding error= : Invalid data found when processing input Last message repeated 14 times [vist#0:0/h264 @ 0x55837b5fd6c0] [dec:h264 @ 0x55837b62c6c0] Decode error r= ate 1 exceeds maximum 0.666667 [vist#0:0/h264 @ 0x55837b5fd6c0] [dec:h264 @ 0x55837b62c6c0] Task finished = with error code: -1145393733 (Error number -1145393733 occurred) [vist#0:0/h264 @ 0x55837b5fd6c0] [dec:h264 @ 0x55837b62c6c0] Terminating th= read with return code -1145393733 (Error number -1145393733 occurred) [vf#0:0 @ 0x55837b5fe540] Cannot determine format of input 0:0 after EOF [vf#0:0 @ 0x55837b5fe540] Task finished with error code: -1094995529 (Inval= id data found when processing input) [vf#0:0 @ 0x55837b5fe540] Terminating thread with return code -1094995529 (= Invalid data found when processing input) [vost#0:0/wrapped_avframe @ 0x55837b5ed680] [enc:wrapped_avframe @ 0x55837b= 62ad00] Could not open encoder before EOF [vost#0:0/wrapped_avframe @ 0x55837b5ed680] Task finished with error code: = -22 (Invalid argument) [vost#0:0/wrapped_avframe @ 0x55837b5ed680] Terminating thread with return = code -22 (Invalid argument) [out#0/null @ 0x55837b632540] Nothing was written into output file, because= at least one of its streams received no packets. On Wed, Jul 30, 2025 at 08:54:22PM +0000, James Almer wrote: > ffmpeg | branch: master | James Almer | Sun Jul 27 16= :14:12 2025 -0300| [eefa6de7d505ecd80e4674146067b99d1b74ddbe] | committer: = James Almer >=20 > avformat/mov: export the correct initial extratada from samples with mult= iple stsd >=20 > The first sample in the stsc box may not refer to the first stsd entry. > This is the case in h264/thezerotheorem-cut.mp4, and as such the > fate-h264_redundant_pps-side_data test is updated accordingly. >=20 > Signed-off-by: James Almer >=20 > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=3Dcommit;h=3Deefa6de7d= 505ecd80e4674146067b99d1b74ddbe > --- >=20 > libavformat/mov.c | 14 ++++++++++++++ > tests/ref/fate/h264_redundant_pps-side_data | 8 ++++---- > 2 files changed, 18 insertions(+), 4 deletions(-) >=20 > diff --git a/libavformat/mov.c b/libavformat/mov.c > index 8f1c5df3c9..55b0950b5e 100644 > --- a/libavformat/mov.c > +++ b/libavformat/mov.c > @@ -10580,6 +10580,20 @@ static int mov_read_header(AVFormatContext *s) > MOVStreamContext *sc =3D st->priv_data; > uint32_t dvdsub_clut[FF_DVDCLUT_CLUT_LEN] =3D {0}; > fix_timescale(mov, sc); > + > + /* Set the primary extradata based on the first Sample. */ > + if (sc->stsc_count && sc->extradata_size && !sc->iamf) { > + sc->last_stsd_index =3D sc->stsc_data[0].id - 1; > + av_freep(&st->codecpar->extradata); > + st->codecpar->extradata_size =3D sc->extradata_size[sc->last= _stsd_index]; > + if (sc->extradata_size[sc->last_stsd_index]) { > + st->codecpar->extradata =3D av_mallocz(sc->extradata_siz= e[sc->last_stsd_index] + AV_INPUT_BUFFER_PADDING_SIZE); > + if (!st->codecpar->extradata) > + return AVERROR(ENOMEM); > + memcpy(st->codecpar->extradata, sc->extradata[sc->last_s= tsd_index], sc->extradata_size[sc->last_stsd_index]); > + } > + } > + > if (st->codecpar->codec_type =3D=3D AVMEDIA_TYPE_AUDIO && > st->codecpar->codec_id =3D=3D AV_CODEC_ID_AAC) { > sti->skip_samples =3D sc->start_pad; > diff --git a/tests/ref/fate/h264_redundant_pps-side_data b/tests/ref/fate= /h264_redundant_pps-side_data > index 8633792d8f..1f4684bf5b 100644 > --- a/tests/ref/fate/h264_redundant_pps-side_data > +++ b/tests/ref/fate/h264_redundant_pps-side_data > @@ -1,12 +1,12 @@ > -a35cca13c3f91d1a279bf576b8264d05 *tests/data/fate/h264_redundant_pps-sid= e_data.nut > -596153 tests/data/fate/h264_redundant_pps-side_data.nut > -#extradata 0: 34, 0x851f08e4 > +92fe70291f72acf94ba56b426bbaccb0 *tests/data/fate/h264_redundant_pps-sid= e_data.nut > +596100 tests/data/fate/h264_redundant_pps-side_data.nut > +#extradata 0: 34, 0x850408e3 > #tb 0: 1/48000 > #media_type 0: video > #codec_id 0: h264 > #dimensions 0: 1920x1080 > #sar 0: 0/1 > -0, -2002, 0, 2002, 247959, 0xdb721881, S=3D1, New Ex= tradata, 34, 0x850408e3 > +0, -2002, 0, 2002, 247959, 0xdb721881 > 0, 0, 4004, 2002, 43356, 0xa366eb79, F=3D0x0 > 0, 2002, 2002, 2002, 11423, 0x9c0a86fa, F=3D0x0 > 0, 4004, 8008, 2002, 50801, 0xfbfe860d, F=3D0x0 >=20 > _______________________________________________ > ffmpeg-cvslog mailing list > ffmpeg-cvslog@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog >=20 > To unsubscribe, visit link above, or email > ffmpeg-cvslog-request@ffmpeg.org with subject "unsubscribe". >=20 --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws. -- Plato --+Xnt6BZa+I2KmHWw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaI5Z+wAKCRBhHseHBAsP q+k8AJ4qHlPNMfrvEsgq0aJmdaiGu1CVrgCfTx9i6N6zl3CCGTF1p03+MCGstUI= =SelN -----END PGP SIGNATURE----- --+Xnt6BZa+I2KmHWw-- --===============6325895983613667369== 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". --===============6325895983613667369==--