summaryrefslogtreecommitdiffstats
path: root/stream/stream_bluray.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_bluray.c')
-rw-r--r--stream/stream_bluray.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/stream/stream_bluray.c b/stream/stream_bluray.c
index 5ef9fc8c60..a40856643b 100644
--- a/stream/stream_bluray.c
+++ b/stream/stream_bluray.c
@@ -42,6 +42,7 @@
#include "common/common.h"
#include "common/msg.h"
#include "options/m_option.h"
+#include "options/options.h"
#include "stream.h"
#include "osdep/timer.h"
#include "discnav.h"
@@ -72,9 +73,6 @@
#define AACS_ERROR_MMC_FAILURE -7 /* MMC failed */
#define AACS_ERROR_NO_DK -8 /* no matching device key */
-char *bluray_device = NULL;
-int bluray_angle = 0;
-
struct bluray_overlay {
struct sub_bitmap *image;
bool clean, hidden;
@@ -703,8 +701,9 @@ static void select_initial_angle(stream_t *s) {
if (!info)
return;
/* Select angle */
- unsigned int angle = 0;
- angle = bluray_angle ? bluray_angle : BLURAY_DEFAULT_ANGLE;
+ unsigned int angle = s->opts->bluray_angle;
+ if (!angle)
+ angle = BLURAY_DEFAULT_ANGLE;
angle = FFMIN(angle, info->angle_count);
if (angle)
bd_select_angle(b->bd, angle);
@@ -718,10 +717,10 @@ static int bluray_stream_open(stream_t *s)
const char *device = NULL;
/* find the requested device */
- if (b->cfg_device)
+ if (b->cfg_device && b->cfg_device[0])
device = b->cfg_device;
- else if (bluray_device)
- device = bluray_device;
+ else if (s->opts->bluray_device && s->opts->bluray_device[0])
+ device = s->opts->bluray_device;
if (!device) {
MP_ERR(s, "No Blu-ray device/location was specified ...\n");