summaryrefslogtreecommitdiffstats
path: root/stream/stream_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_file.c')
-rw-r--r--stream/stream_file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stream/stream_file.c b/stream/stream_file.c
index 28f8f975ce..dfafb773f0 100644
--- a/stream/stream_file.c
+++ b/stream/stream_file.c
@@ -23,6 +23,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
+#include <errno.h>
#include "osdep/io.h"
@@ -169,7 +170,8 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
#endif
f=open(filename,m, openmode);
if(f<0) {
- mp_tmsg(MSGT_OPEN,MSGL_ERR,"File not found: '%s'\n",filename);
+ mp_tmsg(MSGT_OPEN, MSGL_ERR, "Cannot open file '%s': %s\n", filename,
+ strerror(errno));
m_struct_free(&stream_opts,opts);
return STREAM_ERROR;
}