$OpenBSD: patch-stream_stream_bluray_c,v 1.1 2012/03/30 13:23:03 phessler Exp $

Update to new libbluray API

--- stream/stream_bluray.c.orig	Wed Mar  9 01:32:47 2011
+++ stream/stream_bluray.c	Sun Nov 13 23:59:03 2011
@@ -116,7 +116,7 @@ static int bluray_stream_control(stream_t *s, int cmd,
     case STREAM_CTRL_GET_NUM_CHAPTERS: {
         BLURAY_TITLE_INFO *ti;
 
-        ti = bd_get_title_info(b->bd, b->current_title);
+        ti = bd_get_title_info(b->bd, b->current_title, 0);
         if (!ti)
             return STREAM_UNSUPPORTED;
 
@@ -137,7 +137,7 @@ static int bluray_stream_control(stream_t *s, int cmd,
         int64_t pos;
         int r;
 
-        ti = bd_get_title_info(b->bd, b->current_title);
+        ti = bd_get_title_info(b->bd, b->current_title, 0);
         if (!ti)
             return STREAM_UNSUPPORTED;
 
@@ -156,7 +156,7 @@ static int bluray_stream_control(stream_t *s, int cmd,
     case STREAM_CTRL_GET_NUM_ANGLES: {
         BLURAY_TITLE_INFO *ti;
 
-        ti = bd_get_title_info(b->bd, b->current_title);
+        ti = bd_get_title_info(b->bd, b->current_title, 0);
         if (!ti)
             return STREAM_UNSUPPORTED;
 
@@ -175,7 +175,7 @@ static int bluray_stream_control(stream_t *s, int cmd,
         BLURAY_TITLE_INFO *ti;
         int angle = *((int *) arg);
 
-        ti = bd_get_title_info(b->bd, b->current_title);
+        ti = bd_get_title_info(b->bd, b->current_title, 0);
         if (!ti)
             return STREAM_UNSUPPORTED;
 
@@ -222,6 +222,8 @@ static int bluray_stream_open(stream_t *s, int mode,
         device = p->device;
     else if (bluray_device)
         device = bluray_device;
+    else
+      device = DEFAULT_BLURAY_DEVICE;
 
     if (!device) {
         mp_msg(MSGT_OPEN, MSGL_ERR, MSGTR_BlurayNoDevice);
@@ -236,7 +238,7 @@ static int bluray_stream_open(stream_t *s, int mode,
     }
 
     /* check for available titles on disc */
-    title_count = bd_get_titles(bd, TITLES_RELEVANT);
+    title_count = bd_get_titles(bd, TITLES_RELEVANT, 0);
     mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_BLURAY_TITLES=%d\n", title_count);
     if (!title_count) {
         mp_msg(MSGT_OPEN, MSGL_ERR, MSGTR_BlurayNoTitles);
@@ -250,7 +252,7 @@ static int bluray_stream_open(stream_t *s, int mode,
         BLURAY_TITLE_INFO *ti;
         int sec, msec;
 
-        ti = bd_get_title_info(bd, i);
+        ti = bd_get_title_info(bd, i, 0);
         if (!ti)
             continue;
 
@@ -284,7 +286,7 @@ static int bluray_stream_open(stream_t *s, int mode,
            "ID_BLURAY_CURRENT_TITLE=%d\n", title + 1);
 
     /* Get current title information */
-    info = bd_get_title_info(bd, title);
+    info = bd_get_title_info(bd, title, 0);
     if (!info)
         goto err_no_info;
 
