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 BFB534D0EC for ; Sun, 15 Jun 2025 13:18:03 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 97D4D68D271; Sun, 15 Jun 2025 16:18:01 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 6C98968D0BA for ; Sun, 15 Jun 2025 16:17:55 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id D486043978 for ; Sun, 15 Jun 2025 13:17:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1749993475; 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=mPcZR4eZrfU+RUAMM/zPSf2BW/az/+QRUjdwOwz3wuQ=; b=d5gPbZZuqfD2sJiqPKpUSRzFfjDwOn6EfUI1Ku5D2m9NpqyMGun4Of5bZnjmYxnqzu1pM2 /xDIU5XkjGRa6vEIpWt6SZvwPRC5QHiGO8wMOuDgDu4SfhZYJYsHLVCs6Trwc8DXm9mydz IfdHRCddOA8gZeysyq1mkce4TRvBmO7zifIvRCJZk5h7avRSG6ZkiXxP/QWOCBZg5inQXb r0hXWcFXjDWsu8VpmEHF7DfFWaTUy4SQONiYYOSZ0DtfGBebVDnrw7hB4VRZJ35lo0T81u XYO+ZuZvuKb9a1br0qbJM3hOWAHsfEgHSgycS1NDFJ4cR+ibTpzD4t+UnCFmEw== Date: Sun, 15 Jun 2025 15:17:54 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250615131754.GS29660@pb2> References: <20250614195828.20357-1-pkoshevoy@gmail.com> MIME-Version: 1.0 In-Reply-To: X-GND-State: clean X-GND-Score: -70 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugddvfeejlecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdlfedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepieegkedtjeduffejhfetgeejtdegteetgfegtdfhjefgvefhteegkeejtddvhfevnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] avformat/mpegts: Add -reprobe_stream_if_pmt_es_stream_type_changes option 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="===============2287549712852223872==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============2287549712852223872== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gyCSJ4+RndUcalyU" Content-Disposition: inline --gyCSJ4+RndUcalyU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Andreas On Sun, Jun 15, 2025 at 05:24:34AM +0200, Andreas Rheinhardt wrote: > Pavel Koshevoy: > > Make runtime AVStream.codecpar codec_id updates optional and disabled > > by default, so that avformat API clients can enable this feature explic= itly > > when they add support for runtime codec changes. > > --- > > libavformat/mpegts.c | 8 +++++++- > > tests/fate/demux.mak | 2 +- > > 2 files changed, 8 insertions(+), 2 deletions(-) > >=20 > > diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c > > index deb69a0548..88b1754307 100644 > > --- a/libavformat/mpegts.c > > +++ b/libavformat/mpegts.c > > @@ -156,6 +156,8 @@ struct MpegTSContext { > > /** to detect seek */ > > int64_t last_pos; > > =20 > > + int reprobe_stream_if_pmt_es_stream_type_changes; > > + > > int skip_changes; > > int skip_clear; > > int skip_unknown_pmt; > > @@ -199,6 +201,8 @@ static const AVOption options[] =3D { > > MPEGTS_OPTIONS, > > {"fix_teletext_pts", "try to fix pts values of dvb teletext stream= s", offsetof(MpegTSContext, fix_teletext_pts), AV_OPT_TYPE_BOOL, > > {.i64 =3D 1}, 0, 1, AV_OPT_FLAG_DECODING_PARAM }, > > + {"reprobe_stream_if_pmt_es_stream_type_changes", "allow PMT update= s to change codec_type and codec_id at runtime", > > + offsetof(MpegTSContext, reprobe_stream_if_pmt_es_stream_type_chan= ges), AV_OPT_TYPE_BOOL, {.i64 =3D 0}, 0, 1, AV_OPT_FLAG_DECODING_PARAM }, > > {"scan_all_pmts", "scan and combine all PMTs", offsetof(MpegTSCont= ext, scan_all_pmts), AV_OPT_TYPE_BOOL, > > {.i64 =3D -1}, -1, 1, AV_OPT_FLAG_DECODING_PARAM }, > > {"skip_unknown_pmt", "skip PMTs for programs not advertised in the= PAT", offsetof(MpegTSContext, skip_unknown_pmt), AV_OPT_TYPE_BOOL, > > @@ -2510,7 +2514,9 @@ static void pmt_cb(MpegTSFilter *filter, const ui= nt8_t *section, int section_len > > if (!st) > > goto out; > > =20 > > - if (pes && pes->stream_type !=3D stream_type) > > + if (pes && (!pes->stream_type || > > + (pes->stream_type !=3D stream_type && > > + ts->reprobe_stream_if_pmt_es_stream_type_changes)= )) > > mpegts_set_stream_info(st, pes, stream_type, prog_reg_desc= ); > > =20 > > add_pid_to_program(prg, pid); > > diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak > > index ead5ad4b10..6e5e2eb81a 100644 > > --- a/tests/fate/demux.mak > > +++ b/tests/fate/demux.mak > > @@ -158,7 +158,7 @@ FATE_SAMPLES_DEMUX-$(CONFIG_XWMA_DEMUXER) +=3D fate= -xwma-demux > > fate-xwma-demux: CMD =3D crc -i $(TARGET_SAMPLES)/xwma/ergon.xwma -c:a= copy > > =20 > > FATE_FFPROBE_DEMUX-$(CONFIG_MPEGTS_DEMUXER) +=3D fate-ts-demux > > -fate-ts-demux: CMD =3D ffprobe_demux $(TARGET_SAMPLES)/ac3/mp3ac325-48= 64-small.ts > > +fate-ts-demux: CMD =3D ffprobe_demux $(TARGET_SAMPLES)/ac3/mp3ac325-48= 64-small.ts -reprobe_stream_if_pmt_es_stream_type_changes 1 > > =20 > > FATE_FFPROBE_DEMUX-$(CONFIG_MPEGTS_DEMUXER) +=3D fate-ts-timed-id3-dem= ux > > fate-ts-timed-id3-demux: CMD =3D ffprobe_demux $(TARGET_SAMPLES)/mpegt= s/id3.ts >=20 > IMO this should not be mpegts specific, but for all demuxers. Other > (header-less) formats may have the same issue. +1 thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I am the wisest man alive, for I know one thing, and that is that I know nothing. -- Socrates --gyCSJ4+RndUcalyU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaE7IAQAKCRBhHseHBAsP qzeCAJ9gLBmSPcZ5V9Hub4PbRIPx8vkyJACcCaxcLqwwTwDM4Jj84oVHAMn973k= =V7qu -----END PGP SIGNATURE----- --gyCSJ4+RndUcalyU-- --===============2287549712852223872== 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". --===============2287549712852223872==--