summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-16 21:32:09 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-16 21:32:09 +0000
commitadb4813ca8650d3df7345d218e7f47970e097561 (patch)
treeeffb7717de037e1abbe56e185fb24701214a60f7 /stream
parent1f2e78fe06bb470c01db7143ae2e29f69e9049ec (diff)
downloadmpv-adb4813ca8650d3df7345d218e7f47970e097561.tar.bz2
mpv-adb4813ca8650d3df7345d218e7f47970e097561.tar.xz
report why the dvd couldn't be opened. Patch by Jan Knutar jknutar+nic+fi
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25059 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_dvd.c8
-rw-r--r--stream/stream_dvdnav.c3
2 files changed, 7 insertions, 4 deletions
diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c
index d2cb87b18a..ae22f107c2 100644
--- a/stream/stream_dvd.c
+++ b/stream/stream_dvd.c
@@ -24,6 +24,8 @@
#include <sys/ioctl.h>
#endif
+#include <errno.h>
+
#define FIRST_AC3_AID 128
#define FIRST_DTS_AID 136
#define FIRST_MPG_AID 0
@@ -781,12 +783,12 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
snprintf(temp_device, len, "/dev/rdisk%d", i);
dvd = DVDOpen(temp_device);
if(!dvd) {
- mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,temp_device);
+ mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,temp_device, strerror(errno));
} else {
#if DVDREAD_VERSION <= LIBDVDREAD_VERSION(0,9,4)
dvd_file_t *dvdfile = DVDOpenFile(dvd,dvd_title,DVD_READ_INFO_FILE);
if(!dvdfile) {
- mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,temp_device);
+ mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,temp_device, strerror(errno));
DVDClose(dvd);
continue;
}
@@ -806,7 +808,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
{
dvd = DVDOpen(dvd_device);
if(!dvd) {
- mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,dvd_device);
+ mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,dvd_device, strerror(errno));
m_struct_free(&stream_opts,opts);
return STREAM_UNSUPPORTED;
}
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c
index e8f1e86baa..2d1a15237c 100644
--- a/stream/stream_dvdnav.c
+++ b/stream/stream_dvdnav.c
@@ -4,6 +4,7 @@
#include <stdio.h>
#include <unistd.h>
#include <string.h>
+#include <errno.h>
#include "mp_msg.h"
#include "osdep/timer.h"
#include "input/input.h"
@@ -356,7 +357,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
else if(dvd_device) filename= dvd_device;
else filename = DEFAULT_DVD_DEVICE;
if(!(priv=new_dvdnav_stream(filename))) {
- mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,filename);
+ mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,filename, strerror(errno));
return STREAM_UNSUPPORTED;
}