summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-06-26 10:51:44 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-06-26 10:51:44 +0000
commitbca005762fd2161f7f7338bdde3627ece526602c (patch)
tree5e9ec5558513a1b06d865e469f0461e0115db139 /mplayer.c
parent4bf094ac51cf9afa7c8f45ef2336db835cd3f733 (diff)
downloadmpv-bca005762fd2161f7f7338bdde3627ece526602c.tar.bz2
mpv-bca005762fd2161f7f7338bdde3627ece526602c.tar.xz
rtc-device cmd option by James Noble
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12682 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mplayer.c b/mplayer.c
index 5a9984bbd9..42adcd4921 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -343,6 +343,7 @@ static char* menu_root = "main";
#ifdef HAVE_RTC
static int nortc;
+static char* rtc_device;
#endif
#ifdef USE_EDL
@@ -1093,8 +1094,9 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){
if(!nortc)
{
// seteuid(0); /* Can't hurt to try to get root here */
- if ((rtc_fd = open("/dev/rtc", O_RDONLY)) < 0)
- mp_msg(MSGT_CPLAYER, MSGL_WARN, "Failed to open /dev/rtc: %s (/dev/rtc should be readable by the user.)\n", strerror(errno));
+ if ((rtc_fd = open(rtc_device ? rtc_device : "/dev/rtc", O_RDONLY)) < 0)
+ mp_msg(MSGT_CPLAYER, MSGL_WARN, "Failed to open %s: %s (it should be readable by the user.)\n",
+ rtc_device ? rtc_device : "/dev/rtc", strerror(errno));
else {
unsigned long irqp = 1024; /* 512 seemed OK. 128 is jerky. */