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 2BAE446E26 for ; Thu, 13 Jul 2023 23:30:35 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 60F8C68C5A0; Fri, 14 Jul 2023 02:30:33 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AAF5F68C57F for ; Fri, 14 Jul 2023 02:30:26 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 8EA5520002 for ; Thu, 13 Jul 2023 23:30:25 +0000 (UTC) Date: Fri, 14 Jul 2023 01:30:24 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230713233024.GL1093384@pb2> References: <20230713105553.21052-1-anton@khirnov.net> <20230713105553.21052-16-anton@khirnov.net> MIME-Version: 1.0 In-Reply-To: <20230713105553.21052-16-anton@khirnov.net> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 16/33] fftools/ffmpeg_mux_init: improve of_add_programs() 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="===============7632402158413283490==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7632402158413283490== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gBMNUjqROSlRgKnE" Content-Disposition: inline --gBMNUjqROSlRgKnE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 13, 2023 at 12:55:36PM +0200, Anton Khirnov wrote: > Replace duplicated(!) and broken* custom string parsing with > av_dict_parse_string(). Return error codes instead of aborting. >=20 > * e.g. it treats NULL returned from av_get_token() as "separator not > found", when in fact av_get_token() only returns NULL on memory > allocation failure > --- > fftools/ffmpeg_mux_init.c | 111 ++++++++++++++++++-------------------- > 1 file changed, 52 insertions(+), 59 deletions(-) smells like memory corruption -i ~/videos/01c56b0dc1.ts -copy_unknown -map 0 -c copy -fflags +bitexact -= t 3 -y file-copy-unknown.ts http://samples.mplayerhq.hu/ts/01c56b0dc1.ts [mpegts @ 0x2ced6980] Could not find codec parameters for stream 6 (Unknown= : none ([5][0][0][0] / 0x0005)): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize'= (5000000) options Input #0, mpegts, from 'videos/01c56b0dc1.ts': Duration: 00:00:10.73, start: 40848.136244, bitrate: 8431 kb/s Program 1201 Stream #0:0[0xfb]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(t= v, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn Stream #0:1[0x12d](eng): Audio: aac_latm (HE-AAC) ([17][0][0][0] / 0x0011= ), 48000 Hz, stereo, fltp Stream #0:2[0x132](eng): Audio: aac_latm (HE-AAC) ([17][0][0][0] / 0x0011= ), 48000 Hz, stereo, fltp (visual impaired) (descriptions) Stream #0:3[0x192](eng): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, 5.= 1(side), fltp, 384 kb/s Stream #0:4[0x3ea]: Unknown: none ([11][0][0][0] / 0x000B) Stream #0:5[0x401](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (= hearing impaired) Stream #0:6[0x1f40]: Unknown: none ([5][0][0][0] / 0x0005) =3D=3D2131=3D=3D Conditional jump or move depends on uninitialised value(s) =3D=3D2131=3D=3D at 0x3162AF: of_open (in ffmpeg-git/ffmpeg/ffmpeg_g) =3D=3D2131=3D=3D by 0x31863B: open_files.isra.2 (in ffmpeg-git/ffmpeg/ff= mpeg_g) =3D=3D2131=3D=3D by 0x319BAA: ffmpeg_parse_options (in ffmpeg-git/ffmpeg= /ffmpeg_g) =3D=3D2131=3D=3D by 0x2F7A00: main (in ffmpeg-git/ffmpeg/ffmpeg_g) =3D=3D2131=3D=3D Uninitialised value was created by a stack allocation =3D=3D2131=3D=3D at 0x3139DD: of_open (in ffmpeg-git/ffmpeg/ffmpeg_g) =3D=3D2131=3D=3D =3D=3D2131=3D=3D Invalid free() / delete / delete[] / realloc() =3D=3D2131=3D=3D at 0x4C32D3B: free (in /usr/lib/valgrind/vgpreload_memc= heck-amd64-linux.so) =3D=3D2131=3D=3D by 0x315AEF: of_open (in ffmpeg-git/ffmpeg/ffmpeg_g) =3D=3D2131=3D=3D by 0x31863B: open_files.isra.2 (in ffmpeg-git/ffmpeg/ff= mpeg_g) =3D=3D2131=3D=3D by 0x319BAA: ffmpeg_parse_options (in ffmpeg-git/ffmpeg= /ffmpeg_g) =3D=3D2131=3D=3D by 0x2F7A00: main (in ffmpeg-git/ffmpeg/ffmpeg_g) =3D=3D2131=3D=3D Address 0x22f462840 is not stack'd, malloc'd or (recently= ) free'd =3D=3D2131=3D=3D Output #0, mpegts, to 'file-copy-unknown.ts': Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt7= 09, top first), 1920x1080 [SAR 1:1 DAR 16:9], q=3D2-31, 25 fps, 50 tbr, 90k= tbn Stream #0:1(eng): Audio: aac_latm (HE-AAC) ([17][0][0][0] / 0x0011), 4800= 0 Hz, stereo, fltp (default) Stream #0:2(eng): Audio: aac_latm (HE-AAC) ([17][0][0][0] / 0x0011), 4800= 0 Hz, stereo, fltp (visual impaired) (descriptions) Stream #0:3(eng): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, 5.1(side)= , fltp, 384 kb/s Stream #0:4: Unknown: none ([11][0][0][0] / 0x000B) Stream #0:5(eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing= impaired) Stream #0:6: Unknown: none ([5][0][0][0] / 0x0005) Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Stream #0:2 -> #0:2 (copy) Stream #0:3 -> #0:3 (copy) Stream #0:4 -> #0:4 (copy) Stream #0:5 -> #0:5 (copy) Stream #0:6 -> #0:6 (copy) Press [q] to stop, [?] for help [mpegts @ 0x2ced6980] PES packet size mismatche=3D00:00:02.98 bitrate=3D = 0.0kbits/s speed=3D5.97x [mpegts @ 0x2ced6980] Packet corrupt (stream =3D 1, dts =3D 3677260813). [in#0/mpegts @ 0x2ced67c0] corrupt input packet in stream 1 [mpegts @ 0x2ced6980] PES packet size mismatch [mpegts @ 0x2ced6980] Packet corrupt (stream =3D 2, dts =3D 3677250303). [in#0/mpegts @ 0x2ced67c0] corrupt input packet in stream 2 Last message repeated 3 times [mpegts @ 0x2ced6980] PES packet size mismatch [mpegts @ 0x2ced6980] Packet corrupt (stream =3D 3, dts =3D 3677239462). [in#0/mpegts @ 0x2ced67c0] corrupt input packet in stream 3 Last message repeated 1 times [mpegts @ 0x2ea0edc0] Stream 4, codec none, is muxed as a private data stre= am and may not be recognized upon reading. [mpegts @ 0x2ea0edc0] Stream 6, codec none, is muxed as a private data stre= am and may not be recognized upon reading. [out#0/mpegts @ 0x2d09f040] video:484kB audio:206kB subtitle:0kB other stre= ams:0kB global headers:0kB muxing overhead: 6.355365% frame=3D 42 fps=3D0.0 q=3D-1.0 Lsize=3D 734kB time=3D00:00:02.98 bitr= ate=3D2011.2kbits/s speed=3D3.31x =3D=3D2131=3D=3D =3D=3D2131=3D=3D HEAP SUMMARY: =3D=3D2131=3D=3D in use at exit: 49,276 bytes in 240 blocks =3D=3D2131=3D=3D total heap usage: 23,803 allocs, 23,564 frees, 66,233,95= 1 bytes allocated [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you fake or manipulate statistics in a paper in physics you will never get a job again. If you fake or manipulate statistics in a paper in medicin you will get a job for life at the pharma industry. --gBMNUjqROSlRgKnE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZLCJDAAKCRBhHseHBAsP q3qhAJwLxGkmsDT6KsfOOEiP9mXzg7YVegCeJi4wAQjVx3kpHNKbfLYyyzPdO68= =ykcn -----END PGP SIGNATURE----- --gBMNUjqROSlRgKnE-- --===============7632402158413283490== 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". --===============7632402158413283490==--