From 5a2b527100b2a48972ae8152804d4929b7292add Mon Sep 17 00:00:00 2001 From: phintuka Date: Sun, 3 Jul 2011 12:47:53 +0000 Subject: Splitted overlay_proc() --- xine/BluRay/input_bluray.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/xine/BluRay/input_bluray.c b/xine/BluRay/input_bluray.c index 226895b4..613680a1 100644 --- a/xine/BluRay/input_bluray.c +++ b/xine/BluRay/input_bluray.c @@ -155,6 +155,17 @@ static void send_num_buttons(bluray_input_plugin_t *this, int n) xine_event_send(this->stream, &event); } +static xine_osd_t *get_overlay(bluray_input_plugin_t *this, int plane) +{ + if (!this->osd[plane]) { + this->osd[plane] = xine_osd_new(this->stream, 0, 0, 1920, 1080); + } + if (!this->pg_enable) { + _x_select_spu_channel(this->stream, -1); + } + return this->osd[plane]; +} + static void close_overlay(bluray_input_plugin_t *this, int plane) { if (plane < 0) { @@ -223,15 +234,7 @@ static void overlay_proc(void *this_gen, const BD_OVERLAY * const ov) return; } - /* open xine OSD */ - - if (!this->osd[ov->plane]) { - this->osd[ov->plane] = xine_osd_new(this->stream, 0, 0, 1920, 1080); - } - xine_osd_t *osd = this->osd[ov->plane]; - if (!this->pg_enable) { - _x_select_spu_channel(this->stream, -1); - } + xine_osd_t *osd = get_overlay(this, ov->plane); if (ov->img) { draw_bitmap(osd, ov); -- cgit v1.2.3