Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Scott Theisen <scott.the.elm-at-gmail.com@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avformat/mpegts: Add AVFMT_FLAG_ALLOW_CODEC_CHANGES (v2)
Date: Tue, 1 Jul 2025 10:08:57 -0400
Message-ID: <18489e8f-bd18-41ef-901c-9ee5e3abecfb@gmail.com> (raw)
In-Reply-To: <CAJgjuoxT44JPHd0rAPHnnH=Y2Otxud66XM_W05f3ODUvp2V_Ag@mail.gmail.com>

On 2025/06/30 21:32, Pavel Koshevoy wrote:
> On Mon, Jun 30, 2025 at 3:46 PM Scott Theisen <
> scott.the.elm-at-gmail.com@ffmpeg.org> wrote:
>
>> On 2025/06/29 23:55, Pavel Koshevoy wrote:
>>> Make midstream AVStream.codecpar updates optional and disabled
>>> by default, so that avformat API clients can enable this feature
>>> explicitly when they add support for midstream codec changes.
>> Is this signaled in any way or is the client expected to check if
>> codecpar has changed?
>>
> The client is expected to check codecpar for changes ...
> I've described it a bit more here
> https://ffmpeg.org/pipermail/ffmpeg-devel/2025-June/344921.html
>
>
>
>> I ask because MythTV added checking and a callback for streams changing
>> between PMT versions, including adding or removing streams.
>>
>>
> In my code (outside ffmpeg) I've also added a similar mechanism.
> BTW, in mpeg-ts captures that I have the PMT version doesn't always change,
> even when there are significant changes in the program structure.

If the PMT version_number is not incremented, that doesn't comply with 
the standard ("The version number shall be incremented by 1 modulo 32 
when a change in the information carried within the section occurs." 
ISO/IEC 13818-1:2021 §2.4.4.10 Semantic definition of fields in 
transport stream program map section).

Since the CRC would be different, the non-compliant PMT is parsed and 
used (see skip_identical() in mpegts.c).

I had tried to just check the version_number (and 
current_next_indicator), but the Blu-ray for Rio (2011) has a new PMT 
version_number for (I think) every frame, which broke playback of that 
Blu-ray in MythTV since the decoder was resetting every frame, so we had 
to revert back to comparing the PMT data (ignoring the descriptors). 
https://github.com/MythTV/mythtv/commit/616074a0a5f4fa9ad7241e673d6693cbd7b5e310

Regards,

Scott Theisen
_______________________________________________
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".

      parent reply	other threads:[~2025-07-01 14:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-30  3:55 Pavel Koshevoy
2025-06-30 21:45 ` Scott Theisen
2025-07-01  1:32   ` Pavel Koshevoy
2025-07-01  3:46     ` Michael Niedermayer
2025-07-01  5:39       ` Pavel Koshevoy
2025-07-01 14:24         ` Scott Theisen
2025-07-01 14:08     ` Scott Theisen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18489e8f-bd18-41ef-901c-9ee5e3abecfb@gmail.com \
    --to=scott.the.elm-at-gmail.com@ffmpeg.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git