[libbluray-devel] Reduced number of unnecessary OSD close events

hpi1 git at videolan.org
Mon Dec 19 09:39:55 CET 2011


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Dec 19 10:18:14 2011 +0200| [ebba8ac0829740086d4a1386055f961524961d8f] | committer: hpi1

Reduced number of unnecessary OSD close events

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=ebba8ac0829740086d4a1386055f961524961d8f
---

 src/libbluray/decoders/graphics_controller.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/libbluray/decoders/graphics_controller.c b/src/libbluray/decoders/graphics_controller.c
index e35fb43..3ae9c80 100644
--- a/src/libbluray/decoders/graphics_controller.c
+++ b/src/libbluray/decoders/graphics_controller.c
@@ -516,8 +516,12 @@ static void _select_page(GRAPHICS_CONTROLLER *gc, uint16_t page_id)
 
 static void _gc_reset(GRAPHICS_CONTROLLER *gc)
 {
-    _close_osd(gc, BD_OVERLAY_PG);
-    _close_osd(gc, BD_OVERLAY_IG);
+    if (gc->pg_open) {
+        _close_osd(gc, BD_OVERLAY_PG);
+    }
+    if (gc->ig_open) {
+        _close_osd(gc, BD_OVERLAY_IG);
+    }
 
     gc->popup_visible = 0;
     gc->valid_mouse_position = 0;



More information about the libbluray-devel mailing list