[vlc-devel] [PATCH 01/11] vlc_input_item: add documentation on what the duration values stand for
Jean-Baptiste Kempf
jb at videolan.org
Thu Jul 26 07:50:07 CEST 2018
On Thu, 26 Jul 2018, at 06:25, Steve Lhomme wrote:
> On 25/07/2018 21:40, Rémi Denis-Courmont wrote:
> > Le tiistaina 24. heinäkuuta 2018, 16.52.21 EEST Steve Lhomme a écrit :
> >> ---
> >> include/vlc_input_item.h | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/include/vlc_input_item.h b/include/vlc_input_item.h
> >> index 82ad4e4733..5eedd57bdd 100644
> >> --- a/include/vlc_input_item.h
> >> +++ b/include/vlc_input_item.h
> >> @@ -108,8 +108,8 @@ struct input_item_t
> >> };
> >>
> >> #define INPUT_DURATION_INVALID VLC_TICK_INVALID
> >> -#define INPUT_DURATION_ZERO 0
> >> -#define INPUT_DURATION_UNKNOWN (-1)
> >> +#define INPUT_DURATION_ZERO 0 /* temporary duration until it is
> >> known */ +#define INPUT_DURATION_UNKNOWN (-1) /* a duration that will
> >> never be known */
> > That convention is very misleading IMO.
> >
> > Zero should mean zero, not unknown.
> > Unknown should mean unknown, not invalid/inapplicable.
>
> I'll try to clarify more. Basically unkwnown = will never be know, zero
> usually means it's not known yet or will never have a duration (like
> directories).
I agree. To me, the new names are not more obvious that the previous ones.
--
Jean-Baptiste Kempf - President
+33 672 704 734
More information about the vlc-devel
mailing list