libbluray | branch: master | hpi1 <h...@anonymous.org> | Thu Oct 14 16:53:04 2010 +0300| [314fa47e6b0c4d305bedb40e19cbe3e159d96676] | committer: hpi1
Moved sanity checks to gc_run() > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=314fa47e6b0c4d305bedb40e19cbe3e159d96676 --- src/libbluray/decoders/graphics_controller.c | 19 +++++-------------- 1 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/libbluray/decoders/graphics_controller.c b/src/libbluray/decoders/graphics_controller.c index a58599c..0d219f6 100644 --- a/src/libbluray/decoders/graphics_controller.c +++ b/src/libbluray/decoders/graphics_controller.c @@ -257,11 +257,6 @@ static void _render_page(GRAPHICS_CONTROLLER *gc, BD_PG_PALETTE *palette = NULL; unsigned ii; - if (!s || !s->ics) { - ERROR("_render_page(): no interactive composition\n"); - return; - } - if (s->ics->interactive_composition.ui_model == 1 && !gc->popup_visible) { TRACE("_render_page(): popup menu not visible\n"); @@ -340,10 +335,6 @@ static void _user_input(GRAPHICS_CONTROLLER *gc, bd_vk_key_e key, GC_NAV_CMDS *c unsigned ii; int activated_btn_id = -1; - if (!s || !s->ics) { - ERROR("_user_input(): no interactive composition\n"); - return; - } if (s->ics->interactive_composition.ui_model == 1 && !gc->popup_visible) { TRACE("_user_input(): popup menu not visible\n"); return; @@ -424,11 +415,6 @@ static void _set_button_page(GRAPHICS_CONTROLLER *gc, uint32_t param, GC_NAV_CMD TRACE("_set_button_page(0x%08x): page flag %d, id %d, effects %d button flag %d, id %d", param, !!page_flag, page_id, !!effect_flag, !!button_flag, button_id); - if (!s || !s->ics) { - ERROR("_set_button_page(): no interactive composition\n"); - return; - } - /* 10.4.3.4 (D) */ if (!page_flag && !button_flag) { @@ -497,6 +483,11 @@ void gc_run(GRAPHICS_CONTROLLER *gc, gc_ctrl_e ctrl, uint32_t param, GC_NAV_CMDS cmds->nav_cmds = NULL; cmds->sound_id_ref = -1; + if (!gc || !gc->igs || !gc->igs->ics) { + ERROR("gc_run(): no interactive composition\n"); + return; + } + switch (ctrl) { case GC_CTRL_SET_BUTTON_PAGE: _______________________________________________ libbluray-devel mailing list libbluray-devel@videolan.org http://mailman.videolan.org/listinfo/libbluray-devel