[vlc-devel] [PATCH 05/12] vlc_player: store title angles

Rémi Denis-Courmont remi at remlab.net
Fri Apr 3 10:14:29 CEST 2020


Le perjantaina 3. huhtikuuta 2020, 10.16.01 EEST Thomas Guillem a écrit :
> On Fri, Apr 3, 2020, at 09:10, Rémi Denis-Courmont wrote:
> > Le perjantaina 3. huhtikuuta 2020, 10.02.08 EEST Thomas Guillem a écrit :
> > > On Thu, Apr 2, 2020, at 20:40, Francois Cartegnie wrote:
> > > > ---
> > > > 
> > > >  include/vlc_player.h | 2 ++
> > > >  src/player/title.c   | 1 +
> > > >  2 files changed, 3 insertions(+)
> > > > 
> > > > diff --git a/include/vlc_player.h b/include/vlc_player.h
> > > > index 763aae564d..6643f2ebed 100644
> > > > --- a/include/vlc_player.h
> > > > +++ b/include/vlc_player.h
> > > > @@ -963,6 +963,8 @@ struct vlc_player_title
> > > > 
> > > >      unsigned flags;
> > > >      /** Number of chapters, can be 0 */
> > > >      size_t chapter_count;
> > > > 
> > > > +    /** Number of additional viewing angles, usually 0 */
> > > > +    unsigned char additional_angles;
> > > 
> > > If it's a (very small) number, it should be an uint8_t instead of a
> > > uchar,
> > > no ?
> > 
> > What do you mean by that? If it exists, uint8_t necessarily has the same
> > range as unsigned char, i.e. 0-255.
> 
> I meant for code readability. I often expect char to be a character. But yes
> indeed, it can be a number, and unsigned char is necessarily a number too.
> 
> It's just a question of personal taste, I'm OK with both finally.

No, it's not a question of taste. There are specified differences between 
uint8_t and unsigned char. Notably (pointer to) unsigned char can access the 
representation of any object of any type, while (pointer to) uint8_t can not, 
at least not portably.

But being a number is not one of the specified differences.

-- 
Rémi Denis-Courmont
http://www.remlab.net/





More information about the vlc-devel mailing list