[DVDnav-discuss] Mixing of enums in dvdnav_get_next_cache_block()

Erik Hovland erik at hovland.org
Tue Sep 11 00:40:16 CEST 2012


On Fri, Aug 31, 2012 at 3:17 PM, Erik Hovland <erik at hovland.org> wrote:
> The struct dvdnav_vts_change_event_t has the members old_domain and
> new_domain. Both are of the enum type dvd_read_domain_t. The
> struct vm_position_t has a member domain of type domain_t.
>
> dvd_read_domain_t has values of 0-3 for the enums while domain_t
> has bit field values. The later is b/c those domains mean something
> in the actual DVD structure.
>
> dvdnav_get_next_cache_block does this:
> vts_event->old_domain = position_current.domain
> vts_event->new_domain = position_next.domain
>
> Which means that it is assigning values to one enum variable
> that have no meaning. I am starting to come around to the
> idea that the type of old_domain and new_domain should
> just be changed.
>
> Does anyone have any opinion?

If I was going to fix this issue, I would probably do something
like this:
https://github.com/microe/libdvdnav/compare/master...test-change-domain-enum-change

If anyone would like to test that branch
(test-change-domain-enum-change) I would
much appreciate it.

E

-- 
Erik Hovland
erik at hovland.org
http://hovland.org/


More information about the DVDnav-discuss mailing list