[DVDnav-discuss] [PATCH] replace the magic constants in the parental management information
Erik Hovland
erik at hovland.org
Tue Nov 23 19:22:25 CET 2010
>> > This patch replaces the hard coded number of levels in the parental
>> > management information by a constant.
>> >
>> > The size of the bit mask was also hard coded to 2 bytes. This patch
>> > replaces it by sizeof(uint16_t) as it is defined as such in
>> > dvdread/ifo_types.h.
>>
>> I may just accept this. But is it possible to use nr_of_vtss or
>> whatever the flag is in sizeof
>> instead of uint16_t. It is highly unlikely (near impossible) that the
>> sizes of entries in
>> the DVD format are ever going to change. But it always makes more
>> sense to do the
>> sizeof on the variable instead of the type.
>
> Do you mean something like the attached patch ?
Using sizeof on a stack allocated array should be OK. Does anyone
know of a platform that doesn't support this?
E
--
Erik Hovland
erik at hovland.org
http://hovland.org/
More information about the DVDnav-discuss
mailing list