[vlc-devel] Open issue: timestamp overflows

Rémi Denis-Courmont remi at remlab.net
Mon Nov 13 12:04:45 CET 2017

Le 13 novembre 2017 11:58:38 GMT+02:00, Denis Charmet <typx at dinauz.org> a écrit :
>On 2017-11-12 18:33, Rémi Denis-Courmont wrote:
>> This leads to two and a half questions:
>> 1.a) What do we do if timestamp overflows? IMO, adding error cases is
>> overkill.
>> We should allow timestamp to wrap around.
>The worst case scenario I can imagine with timestamp overflowing is an 
>ES_OUT_RESET_PCR flushing the fifos. It shouldn't be too crippling. 
>Besides live streaming support implies timestamps wrapping around so it
>should work.
>> 1.b) Do we switch everything to date_t and handle scaling there? Do
>> add a
>> dedicated helper to rescale timestamps?
>It makes sense for complex demuxes like MKV but none for AVI so it 
>seems a little overkill to generalize it.
>> 2) How do we detect it in the first place? So far, we only have a
>> solution
>> for GCC and Clang. Do we drop standard conformance? Do we allow minor
>> UB
>> issues on other compilers? Do we implement the check the hard way? Or
>> do we do
>> nothing at all?
>Checks are costly and I'd rather have checks for buffer sizes and 
>indexes than timestamps.
>Denis Charmet - TypX
>Le mauvais esprit est un art de vivre
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:

Timestamp overflowing is UB. Currently, it does not break production builds in any *known* way, but it does block UBSAN.

So I cannot agree with the statement that it is not an issue in AVI.
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.

More information about the vlc-devel mailing list