From 35e6d1abe0315caee3f21ca3853d76423baa0c91 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 10 Jun 2014 22:09:27 +0200 Subject: stream_dvd, stream_dvdnav, stream_bluray: remove global option variables --- stream/stream_bluray.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'stream/stream_bluray.c') 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"); -- cgit v1.2.3