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 8743D42FAE for ; Fri, 14 Oct 2022 23:01:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 70FAA68BD59; Sat, 15 Oct 2022 02:01:05 +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 C2A5468BC5C for ; Sat, 15 Oct 2022 02:00:58 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id C2BFB20009 for ; Fri, 14 Oct 2022 23:00:57 +0000 (UTC) Date: Sat, 15 Oct 2022 01:00:56 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20221014230056.GA3834789@pb2> References: <20220926202125.GW6583@pb2> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH v2] lavc/hevc_ps: fix process failed when SPS before VPS in hvcC 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="===============6600210578544420974==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6600210578544420974== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 14, 2022 at 06:13:14PM +0800, wangyaqiang wrote: >=20 >=20 > > 2022=E5=B9=B49=E6=9C=8827=E6=97=A5 04:21=EF=BC=8CMichael Niedermayer =E5=86=99=E9=81=93=EF=BC=9A > >=20 > > On Mon, Sep 26, 2022 at 05:38:14PM +0800, 1035567130@qq.com wrote: > >> From: Wang Yaqiang > >>=20 > >> In some videos, SPS will be stored before VPS in hvcC box, > >> parse SPS does not depend on VPS, so the video is expected to be proce= ssed normally. > >> Added "parsed_vps" parameter to indicate whether VPS have been parsed. > >> Only VPS have been parsed can be verified during SPS parsing. > >>=20 > >> Signed-off-by: Wang Yaqiang > >> --- > >> libavcodec/hevc_ps.c | 3 +-- > >> 1 file changed, 1 insertion(+), 2 deletions(-) > >=20 > > This causes segfaults > >=20 > > =3D=3D816=3D=3D Invalid read of size 8 > > =3D=3D816=3D=3D at 0xFAF178: hevc_parse (in ffmpeg_g) > > =3D=3D816=3D=3D by 0xA7A2A6: av_parser_parse2 (in ffmpeg_g) > > =3D=3D816=3D=3D by 0x5FC388: parse_packet (in ffmpeg_g) > > =3D=3D816=3D=3D by 0x5FDC5D: read_frame_internal (in ffmpeg_g) > > =3D=3D816=3D=3D by 0x5FFA10: avformat_find_stream_info (in ffmpeg_g) > > =3D=3D816=3D=3D by 0x2F6054: open_input_file (in ffmpeg_g) > > =3D=3D816=3D=3D by 0x2FC6AB: ffmpeg_parse_options (in ffmpeg_g) > > =3D=3D816=3D=3D by 0x2E8A34: main (in ffmpeg_g) > > =3D=3D816=3D=3D Address 0x8 is not stack'd, malloc'd or (recently) fre= e'd > >=20 > >=20 > > [...] >=20 > Excuse me, we have run tests on our own business and have not found this = problem, but it is a hidden risk,really hope you can tell me how to reprodu= ce this problem. Thanks heres a more complete stack trace, i willmail you the input sample privatly Trailing option(s) found in the command: may be ignored. [hevc @ 0x16a0ad40] Invalid NAL unit 0, skipping. [hevc @ 0x16a0ad40] PTL information too short =3D=3D24589=3D=3D at 0x12A19DF: VALGRIND_PRINTF_BACKTRACE (valgrind.h:63= 03) =3D=3D24589=3D=3D by 0x12A259D: av_log_default_callback (log.c:399) =3D=3D24589=3D=3D by 0x12A2844: av_vlog (log.c:434) =3D=3D24589=3D=3D by 0x12A26A3: av_log (log.c:413) =3D=3D24589=3D=3D by 0x10A7216: parse_ptl (hevc_ps.c:342) =3D=3D24589=3D=3D by 0x10A78B4: ff_hevc_decode_nal_vps (hevc_ps.c:503) =3D=3D24589=3D=3D by 0x10A579C: parse_nal_units (hevc_parser.c:212) =3D=3D24589=3D=3D by 0x10A5B46: hevc_parse (hevc_parser.c:331) =3D=3D24589=3D=3D by 0xB82366: av_parser_parse2 (parser.c:163) =3D=3D24589=3D=3D by 0x61BD17: parse_packet (demux.c:1140) =3D=3D24589=3D=3D by 0x61C936: read_frame_internal (demux.c:1334) =3D=3D24589=3D=3D by 0x6217A7: avformat_find_stream_info (demux.c:2612) =3D=3D24589=3D=3D by 0x246A51: open_input_file (ffmpeg_opt.c:1315) =3D=3D24589=3D=3D by 0x255E38: open_files (ffmpeg_opt.c:3703) =3D=3D24589=3D=3D by 0x255FEC: ffmpeg_parse_options (ffmpeg_opt.c:3742) =3D=3D24589=3D=3D by 0x26EFEE: main (ffmpeg.c:4236) [hevc @ 0x16a0ad40] VPS 0 does not exist =3D=3D24589=3D=3D Invalid read of size 8 =3D=3D24589=3D=3D at 0x10A5189: hevc_parse_slice_header (hevc_parser.c:8= 8) =3D=3D24589=3D=3D by 0x10A584E: parse_nal_units (hevc_parser.c:245) =3D=3D24589=3D=3D by 0x10A5B46: hevc_parse (hevc_parser.c:331) =3D=3D24589=3D=3D by 0xB82366: av_parser_parse2 (parser.c:163) =3D=3D24589=3D=3D by 0x61BD17: parse_packet (demux.c:1140) =3D=3D24589=3D=3D by 0x61C936: read_frame_internal (demux.c:1334) =3D=3D24589=3D=3D by 0x6217A7: avformat_find_stream_info (demux.c:2612) =3D=3D24589=3D=3D by 0x246A51: open_input_file (ffmpeg_opt.c:1315) =3D=3D24589=3D=3D by 0x255E38: open_files (ffmpeg_opt.c:3703) =3D=3D24589=3D=3D by 0x255FEC: ffmpeg_parse_options (ffmpeg_opt.c:3742) =3D=3D24589=3D=3D by 0x26EFEE: main (ffmpeg.c:4236) =3D=3D24589=3D=3D Address 0x8 is not stack'd, malloc'd or (recently) free'd =3D=3D24589=3D=3D=20 =3D=3D24589=3D=3D=20 =3D=3D24589=3D=3D Process terminating with default action of signal 11 (SIG= SEGV) =3D=3D24589=3D=3D Access not within mapped region at address 0x8 =3D=3D24589=3D=3D at 0x10A5189: hevc_parse_slice_header (hevc_parser.c:8= 8) =3D=3D24589=3D=3D by 0x10A584E: parse_nal_units (hevc_parser.c:245) =3D=3D24589=3D=3D by 0x10A5B46: hevc_parse (hevc_parser.c:331) =3D=3D24589=3D=3D by 0xB82366: av_parser_parse2 (parser.c:163) =3D=3D24589=3D=3D by 0x61BD17: parse_packet (demux.c:1140) =3D=3D24589=3D=3D by 0x61C936: read_frame_internal (demux.c:1334) =3D=3D24589=3D=3D by 0x6217A7: avformat_find_stream_info (demux.c:2612) =3D=3D24589=3D=3D by 0x246A51: open_input_file (ffmpeg_opt.c:1315) =3D=3D24589=3D=3D by 0x255E38: open_files (ffmpeg_opt.c:3703) =3D=3D24589=3D=3D by 0x255FEC: ffmpeg_parse_options (ffmpeg_opt.c:3742) =3D=3D24589=3D=3D by 0x26EFEE: main (ffmpeg.c:4236) [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Concerning the gods, I have no means of knowing whether they exist or not or of what sort they may be, because of the obscurity of the subject, and the brevity of human life -- Protagoras --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCY0nqIQAKCRBhHseHBAsP qxmfAJ0Typ5y/5l1wpJjPt/Vk0wYa/gtWACeJJwUqQlVCboZN8SIbsUD7Pc3r2w= =4k+p -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA-- --===============6600210578544420974== 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". --===============6600210578544420974==--