[FFmpeg-devel] [PATCH v2] avformat/mpegts: set data broadcast streams as such

Jan Ekström jeebjp at gmail.com
Tue Apr 19 13:13:25 EEST 2022


On Tue, Apr 19, 2022 at 3:00 AM Marton Balint <cus at passwd.hu> wrote:
>
>
>
> On Thu, 14 Apr 2022, Jan Ekström wrote:
>
> > On Mon, Apr 11, 2022 at 1:50 PM Jan Ekström <jeebjp at gmail.com> wrote:
> >>
> >> From: Jan Ekström <jan.ekstrom at 24i.com>
> >>
> >> Additionally, they should not be probed, as this is essentially
> >> various types of binary data.
> >>
> >> Signed-off-by: Jan Ekström <jan.ekstrom at 24i.com>
> >> ---
> >
> > Ping.
> >
> > Basically this checks if we have an unknown stream with a private
> > stream type still at the end of the per-stream loop in PMT parsing,
> > and then cancels the stop of parsing that usually occurs as a PMT is
> > hit. Instead the logic will continue parsing further. When an SDT is
> > then found and a PMT for that program has already been received, it
> > will then stop header reading at that point.
>
> But why does it matter when the initial parsing is stopped? I mean it
> stops at the first PMT right now, nobody expects it to find all the
> programs and all the streams or all the stream codecs/parameters.
>
> I am saying, that ideally, the ts->stop_parse magic should not be needed
> to be changed to fix your issue and when an SDT is detected with the
> broadcast descriptor that should stop any existing data stream parsing. Do
> you know why it does not work like that?
>

If the codec is unknown after header parsing, the general parsing
logic is utilized to probe which codec is possibly in that unknown
stream, and thus more data is read from that stream, which can cause
further delays.

If the codec is known as data, it leads to no such result.

Basically, the idea is to figure out whether a stream is a data stream
or not during header parsing, if possible.

Jan


More information about the ffmpeg-devel mailing list