diff options
author | wm4 <wm4@nowhere> | 2014-06-10 22:09:27 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-11 00:39:06 +0200 |
commit | 35e6d1abe0315caee3f21ca3853d76423baa0c91 (patch) | |
tree | e17f0f7f035cf8c5ee3cd5aab741bddc1a134b36 /stream/stream_bluray.c | |
parent | 959b718957527710b4bcf6e7227a0beaeb034137 (diff) | |
download | mpv-35e6d1abe0315caee3f21ca3853d76423baa0c91.tar.bz2 mpv-35e6d1abe0315caee3f21ca3853d76423baa0c91.tar.xz |
stream_dvd, stream_dvdnav, stream_bluray: remove global option variables
Diffstat (limited to 'stream/stream_bluray.c')
-rw-r--r-- | stream/stream_bluray.c | 15 |
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"); |