[vlc-devel] [PATCH] demux: ts: fixed duration probing

jeremy.vignelles at dev3i.fr jeremy.vignelles at dev3i.fr
Thu Jun 7 11:51:08 CEST 2018

If I understand correctly, in the case the stream size is unknown, i_stream_size is 0.
The behavior did not change from the original code, since a do/while is being used.

Indeed, in the case the stream is empty, the seek + probing is useless. Is that really an issue? Do we often have empty streams?
In the case of the streams of unknown size however, what should be the behavior of the ProbeStart/ProbeEnd functions?
Seeking to 0 in ProbeStart is not a problem in my opinion, because we want to know the start of the stream.
In probe end however, the code will look at the end of the first chunk (i_pos == 0), and maybe we should return VLC_EGENERIC instead?

I don't understand your statement about "p_sys->i_packet_size * i_probe_count" however.
ProbeStart : i_probe_count starts at 0, so i_stream_size can't be < 0
ProbeEnd : i_stream_size < p_sys->i_packet_size * i_probe_count means i_pos starts at 0, and the chunk will go to the end of the stream,  so there's no problem either

-----Message d'origine-----
De : vlc-devel <vlc-devel-bounces at videolan.org> De la part de Francois Cartegnie
Envoyé : jeudi 7 juin 2018 09:56
À : vlc-devel at videolan.org
Objet : Re: [vlc-devel] [PATCH] demux: ts: fixed duration probing

Le 07/06/2018 à 09:27, jeremy.vignelles at dev3i.fr a écrit :
> Hello,
> Is there anything else you need to apply this patch?

If the stream size is unknown or is < p_sys->i_packet_size * i_probe_count that does useless probing + seeks to 0

Francois Cartegnie
VideoLAN - VLC Developer
vlc-devel mailing list
To unsubscribe or modify your subscription options:

More information about the vlc-devel mailing list