[libbluray-devel] Check for NULL
Petri Hintukainen
phintuka at users.sourceforge.net
Fri Jun 9 10:25:09 CEST 2017
ti, 2017-06-06 kello 13:31 +0200, Andreas Zelend kirjoitti:
> Just to be sure that this doesn't hide a bug. When calling
> "bd_get_event(bd, NULL)" to init the queue, before "disc" is
> initialized we'll miss the event "DISC_EVENT_TITLE".
Yes. Those events are fired for the application when event queue is
initialized, just to make sure every setting has some "sane" default
value. Internally those initialization events are not needed.
I think sending this event here to disc layer is even incorrect. There
are some "side effects", but looks like the event is ignored in lower
layers.
> To be honest, I don't know why this event is firedĀ even though the
> disc is not opened.
Historical reasons ... some time ago it was not possible to init event
queue before opening the disc :).
Anyway, looks like TITLE and ANGLE events are now redundant (those are
sent always when title is started / playlist is opened). But stream
events are triggered only when stream changes (there is no
undefined/unselected value for selected stream). It reduces double
events.
Maybe this could be changed so that those events are sent only when
playlist is opened. The values depend on selected title/playlist
anyway. And it is up to the application to init events early enough.
> _______________________________________________
> libbluray-devel mailing list
> libbluray-devel at videolan.org
> https://mailman.videolan.org/listinfo/libbluray-devel
More information about the libbluray-devel
mailing list